QOJ.ac
QOJ
ID | 题目 | 提交者 | 结果 | 用时 | 内存 | 语言 | 文件大小 | 提交时间 | 测评时间 |
---|---|---|---|---|---|---|---|---|---|
#370465 | #5038. City | zzuqy# | WA | 0ms | 3656kb | C++11 | 550b | 2024-03-29 08:34:21 | 2024-03-29 08:34:22 |
Judging History
answer
#include<bits/stdc++.h>
using namespace std;
long long read()
{
long long x;scanf("%lld",&x);return x;
}
long long ans;
int n,m;
int main()
{
n=read();m=read();
for(int i=0;i<=n;i++)
{
for(int j=0;j<=n;j++)
{
int X1=0;
int X2=2*i-X1;
if(X2>n)
X2=n,X1=2*i-X2;
int Y1=0;
int Y2=2*j-Y1;
if(Y2>m)
Y2=m,Y1=2*j-Y1;
ans+=(Y2-Y1+1)*(X2-X1+1)/2*2;
}
}
cout<<ans;
}
詳細信息
Test #1:
score: 100
Accepted
time: 0ms
memory: 3596kb
input:
1 1
output:
0
result:
ok 1 number(s): "0"
Test #2:
score: 0
Accepted
time: 0ms
memory: 3552kb
input:
2 3
output:
14
result:
ok 1 number(s): "14"
Test #3:
score: -100
Wrong Answer
time: 0ms
memory: 3656kb
input:
252 139
output:
-909151740
result:
wrong answer 1st numbers differ - expected: '156806790', found: '-909151740'