QOJ.ac
QOJ
ID | Problem | Submitter | Result | Time | Memory | Language | File size | Submit time | Judge time |
---|---|---|---|---|---|---|---|---|---|
#617466 | #1958. Grid Triangle | IllusionaryDominance# | WA | 37ms | 3668kb | C++20 | 735b | 2024-10-06 15:41:35 | 2024-10-06 15:41:35 |
Judging History
answer
#include <bits/stdc++.h>
using namespace std;
int main(){
ios::sync_with_stdio(0), cin.tie(0), cout.tie(0);
int A, B, C; cin >> A >> B >> C;
long long ans = 0;
for (int i = 3; i <= min(A, B); ++ i){
int maxs = min(C, i - 1);
ans += maxs - (i - maxs) + 1;
if((i & 1) == 0 && (i >> 1) <= C) -- ans;
}
for (int i = 3; i <= min(A, C); ++ i){
int maxs = min(B, i - 1);
ans += maxs - (i - maxs) + 1;
if((i & 1) == 0 && (i >> 1) <= B) -- ans;
}
for (int i = 3; i <= min(B, C); ++ i){
int maxs = min(A, i - 1);
ans += maxs - (i - maxs) + 1;
if((i & 1) == 0 && (i >> 1) <= A) -- ans;
}
cout << ans * 8;
}
Details
Tip: Click on the bar to expand more detailed information
Test #1:
score: 100
Accepted
time: 0ms
memory: 3604kb
input:
1 1 4
output:
0
result:
ok single line: '0'
Test #2:
score: 0
Accepted
time: 0ms
memory: 3512kb
input:
1 1 5
output:
0
result:
ok single line: '0'
Test #3:
score: 0
Accepted
time: 0ms
memory: 3492kb
input:
1 2 6
output:
0
result:
ok single line: '0'
Test #4:
score: 0
Accepted
time: 0ms
memory: 3596kb
input:
1 2 7
output:
0
result:
ok single line: '0'
Test #5:
score: 0
Accepted
time: 0ms
memory: 3468kb
input:
2 2 8
output:
0
result:
ok single line: '0'
Test #6:
score: 0
Accepted
time: 0ms
memory: 3556kb
input:
2 3 9
output:
16
result:
ok single line: '16'
Test #7:
score: 0
Accepted
time: 0ms
memory: 3580kb
input:
2 3 10
output:
16
result:
ok single line: '16'
Test #8:
score: 0
Accepted
time: 0ms
memory: 3616kb
input:
2 3 11
output:
16
result:
ok single line: '16'
Test #9:
score: 0
Accepted
time: 0ms
memory: 3600kb
input:
3 4 12
output:
64
result:
ok single line: '64'
Test #10:
score: 0
Accepted
time: 0ms
memory: 3668kb
input:
3 4 13
output:
64
result:
ok single line: '64'
Test #11:
score: 0
Accepted
time: 0ms
memory: 3612kb
input:
3 4 14
output:
64
result:
ok single line: '64'
Test #12:
score: 0
Accepted
time: 0ms
memory: 3608kb
input:
3 5 15
output:
80
result:
ok single line: '80'
Test #13:
score: 0
Accepted
time: 37ms
memory: 3604kb
input:
10000000 10000000 10000000
output:
1199999760000000
result:
ok single line: '1199999760000000'
Test #14:
score: -100
Wrong Answer
time: 15ms
memory: 3524kb
input:
7663341 2799917 6434354
output:
122646804928704
result:
wrong answer 1st lines differ - expected: '125432496112224', found: '122646804928704'