QOJ.ac
QOJ
ID | 题目 | 提交者 | 结果 | 用时 | 内存 | 语言 | 文件大小 | 提交时间 | 测评时间 |
---|---|---|---|---|---|---|---|---|---|
#420184 | #1958. Grid Triangle | ZayinCTT# | WA | 0ms | 1652kb | C++11 | 1.5kb | 2024-05-24 15:12:09 | 2024-05-24 15:12:10 |
Judging History
answer
// 那就是希望。
// 即便需要取模,也是光明。
#include <algorithm>
#include <stdio.h>
#include <vector>
typedef long long llt;
typedef unsigned uint;typedef unsigned long long ullt;
typedef bool bol;typedef char chr;typedef void voi;
typedef double dbl;
template<typename T>bol _max(T&a,T b){return(a<b)?a=b,true:false;}
template<typename T>bol _min(T&a,T b){return(b<a)?a=b,true:false;}
template<typename T>T lowbit(T n){return n&-n;}
template<typename T>T gcd(T a,T b){return b?gcd(b,a%b):a;}
template<typename T>T lcm(T a,T b){return(a!=0||b!=0)?a/gcd(a,b)*b:(T)0;}
template<typename T>T exgcd(T a,T b,T&x,T&y){if(b!=0){T ans=exgcd(b,a%b,y,x);y-=a/b*x;return ans;}else return y=0,x=1,a;}
template<typename T>T power(T base,T index,T mod)
{
T ans=1%mod;
while(index)
{
if(index&1)ans=ans*base%mod;
base=base*base%mod,index>>=1;
}
return ans;
}
// Your shadow Gets in the way of my light
ullt solve(uint a,uint b,uint c)
{
ullt ans=0;
uint r=std::min(a,c);
for(uint t=2;t<=r;t++)
{
ans+=std::min(b,t-1);
if(!(t&1)&&t<=2*b)
ans--;
}
return ans;
}
int main()
{
#ifdef MYEE
freopen("QAQ.in","r",stdin);
freopen("QAQ.out","w",stdout);
#endif
uint a,b,c;scanf("%u%u%u",&a,&b,&c);
printf("%llu\n",8*(solve(a,b,c)+solve(b,c,a)+solve(c,a,b)));
return 0;
}
// 那就是希望。
// 即便需要取模,也是光明。
详细
Test #1:
score: 100
Accepted
time: 0ms
memory: 1540kb
input:
1 1 4
output:
0
result:
ok single line: '0'
Test #2:
score: 0
Accepted
time: 0ms
memory: 1608kb
input:
1 1 5
output:
0
result:
ok single line: '0'
Test #3:
score: 0
Accepted
time: 0ms
memory: 1640kb
input:
1 2 6
output:
0
result:
ok single line: '0'
Test #4:
score: 0
Accepted
time: 0ms
memory: 1608kb
input:
1 2 7
output:
0
result:
ok single line: '0'
Test #5:
score: 0
Accepted
time: 0ms
memory: 1652kb
input:
2 2 8
output:
0
result:
ok single line: '0'
Test #6:
score: 0
Accepted
time: 0ms
memory: 1632kb
input:
2 3 9
output:
16
result:
ok single line: '16'
Test #7:
score: 0
Accepted
time: 0ms
memory: 1576kb
input:
2 3 10
output:
16
result:
ok single line: '16'
Test #8:
score: 0
Accepted
time: 0ms
memory: 1588kb
input:
2 3 11
output:
16
result:
ok single line: '16'
Test #9:
score: 0
Accepted
time: 0ms
memory: 1624kb
input:
3 4 12
output:
64
result:
ok single line: '64'
Test #10:
score: 0
Accepted
time: 0ms
memory: 1600kb
input:
3 4 13
output:
64
result:
ok single line: '64'
Test #11:
score: 0
Accepted
time: 0ms
memory: 1628kb
input:
3 4 14
output:
64
result:
ok single line: '64'
Test #12:
score: -100
Wrong Answer
time: 0ms
memory: 1608kb
input:
3 5 15
output:
88
result:
wrong answer 1st lines differ - expected: '80', found: '88'