QOJ.ac
QOJ
ID | Problem | Submitter | Result | Time | Memory | Language | File size | Submit time | Judge time |
---|---|---|---|---|---|---|---|---|---|
#370466 | #5038. City | zzuqy# | WA | 0ms | 3684kb | C++11 | 550b | 2024-03-29 08:35:17 | 2024-03-29 08:35:17 |
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-Y1;
ans+=(Y2-Y1+1)*(X2-X1+1)/2*2;
}
}
cout<<ans;
}
Details
Tip: Click on the bar to expand more detailed information
Test #1:
score: 100
Accepted
time: 0ms
memory: 3684kb
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:
4
result:
wrong answer 1st numbers differ - expected: '14', found: '4'