QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#46663#1958. Grid Triangleneko_nyaa#WA 3ms3708kbC++23612b2022-08-30 17:19:252022-08-30 17:19:26

Judging History

你现在查看的是最新测评结果

  • [2023-08-10 23:21:45]
  • System Update: QOJ starts to keep a history of the judgings of all the submissions.
  • [2022-08-30 17:19:26]
  • 评测
  • 测评结果:WA
  • 用时:3ms
  • 内存:3708kb
  • [2022-08-30 17:19:25]
  • 提交

answer

#include <bits/stdc++.h>
using namespace std;

#define int long long

int solve(int sum, int mxx) {
    if (mxx < (sum-1)/2) return 0;

    mxx = min(mxx, sum-1);
    int mn = sum-mxx;
    int mx = mxx;

    //cout << sum << ' ' << mxx << ' ' << mx << ' ' << mx-mn+1 << '\n';
    int ans = mx-mn+1;
    if (sum % 2 == 0) ans--;
    return ans;
}

signed main() {
    ios::sync_with_stdio(0); cin.tie(0);

    int a, b, c; cin >> a >> b >> c;
    int ans = 0;
    ans += solve(min(a, b), c);
    ans += solve(min(b, c), a);
    ans += solve(min(c, a), b);
    cout << ans*8 << '\n';
}

詳細信息

Test #1:

score: 100
Accepted
time: 2ms
memory: 3620kb

input:

1 1 4

output:

0

result:

ok single line: '0'

Test #2:

score: 0
Accepted
time: 2ms
memory: 3628kb

input:

1 1 5

output:

0

result:

ok single line: '0'

Test #3:

score: 0
Accepted
time: 0ms
memory: 3604kb

input:

1 2 6

output:

0

result:

ok single line: '0'

Test #4:

score: 0
Accepted
time: 3ms
memory: 3624kb

input:

1 2 7

output:

0

result:

ok single line: '0'

Test #5:

score: 0
Accepted
time: 3ms
memory: 3676kb

input:

2 2 8

output:

0

result:

ok single line: '0'

Test #6:

score: 0
Accepted
time: 3ms
memory: 3604kb

input:

2 3 9

output:

16

result:

ok single line: '16'

Test #7:

score: 0
Accepted
time: 3ms
memory: 3632kb

input:

2 3 10

output:

16

result:

ok single line: '16'

Test #8:

score: 0
Accepted
time: 2ms
memory: 3668kb

input:

2 3 11

output:

16

result:

ok single line: '16'

Test #9:

score: -100
Wrong Answer
time: 2ms
memory: 3708kb

input:

3 4 12

output:

48

result:

wrong answer 1st lines differ - expected: '64', found: '48'