QOJ.ac
QOJ
ID | 题目 | 提交者 | 结果 | 用时 | 内存 | 语言 | 文件大小 | 提交时间 | 测评时间 |
---|---|---|---|---|---|---|---|---|---|
#46663 | #1958. Grid Triangle | neko_nyaa# | WA | 3ms | 3708kb | C++23 | 612b | 2022-08-30 17:19:25 | 2022-08-30 17:19:26 |
Judging History
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'