QOJ.ac
QOJ
ID | 题目 | 提交者 | 结果 | 用时 | 内存 | 语言 | 文件大小 | 提交时间 | 测评时间 |
---|---|---|---|---|---|---|---|---|---|
#249753 | #1958. Grid Triangle | NYCU_gAwr_gurA# | WA | 0ms | 3732kb | C++17 | 744b | 2023-11-12 15:03:10 | 2023-11-12 15:03:10 |
Judging History
answer
#include <bits/stdc++.h>
using namespace std;
#ifdef DEBUG
#define fast
#else
#define fast cin.tie(0)->sync_with_stdio(0)
#define endl '\n'
#define cerr if(1);else cerr
#endif
#define _ <<' '<<
#define ft first
#define sd second
using ll = long long;
using ld = long double;
using pii = pair<int,int>;
signed main() {
fast;
int arr[3], id[]={0,1,2};
for(int i=0;i<3;i++)
cin>>arr[i];
sort(arr,arr+3);
ll ans=0;
do
{
ll a=0, b=0, c=0;
for(int i=1;i<=arr[id[2]];i++)
{
if(i<=min(arr[id[2]], arr[id[0]]))
c+=b;
if(i<=arr[id[1]])
b+=a;
if(i<=arr[id[0]])
a++;
}
ans+=c;
cerr _ c _ endl;
}
while(next_permutation(id,id+3));
cout<<ans*8<<endl;
return 0;
}
詳細信息
Test #1:
score: 100
Accepted
time: 0ms
memory: 3732kb
input:
1 1 4
output:
0
result:
ok single line: '0'
Test #2:
score: 0
Accepted
time: 0ms
memory: 3668kb
input:
1 1 5
output:
0
result:
ok single line: '0'
Test #3:
score: 0
Accepted
time: 0ms
memory: 3644kb
input:
1 2 6
output:
0
result:
ok single line: '0'
Test #4:
score: 0
Accepted
time: 0ms
memory: 3616kb
input:
1 2 7
output:
0
result:
ok single line: '0'
Test #5:
score: 0
Accepted
time: 0ms
memory: 3596kb
input:
2 2 8
output:
0
result:
ok single line: '0'
Test #6:
score: 0
Accepted
time: 0ms
memory: 3672kb
input:
2 3 9
output:
16
result:
ok single line: '16'
Test #7:
score: 0
Accepted
time: 0ms
memory: 3716kb
input:
2 3 10
output:
16
result:
ok single line: '16'
Test #8:
score: 0
Accepted
time: 0ms
memory: 3676kb
input:
2 3 11
output:
16
result:
ok single line: '16'
Test #9:
score: -100
Wrong Answer
time: 0ms
memory: 3656kb
input:
3 4 12
output:
96
result:
wrong answer 1st lines differ - expected: '64', found: '96'