QOJ.ac
QOJ
ID | 题目 | 提交者 | 结果 | 用时 | 内存 | 语言 | 文件大小 | 提交时间 | 测评时间 |
---|---|---|---|---|---|---|---|---|---|
#370467 | #5038. City | zzuqy# | WA | 0ms | 3832kb | C++11 | 550b | 2024-03-29 08:36:55 | 2024-03-29 08:36:55 |
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<=m;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-Y2;
ans+=(Y2-Y1+1)*(X2-X1+1)/2*2;
}
}
cout<<ans;
}
详细
Test #1:
score: 100
Accepted
time: 0ms
memory: 3832kb
input:
1 1
output:
0
result:
ok 1 number(s): "0"
Test #2:
score: -100
Wrong Answer
time: 0ms
memory: 3684kb
input:
2 3
output:
28
result:
wrong answer 1st numbers differ - expected: '14', found: '28'