QOJ.ac
QOJ
ID | Problem | Submitter | Result | Time | Memory | Language | File size | Submit time | Judge time |
---|---|---|---|---|---|---|---|---|---|
#337980 | #5038. City | Kevin5307 | WA | 1ms | 3596kb | C++23 | 277b | 2024-02-25 16:43:04 | 2024-02-25 16:43:05 |
Judging History
answer
#include<bits/stdc++.h>
using namespace std;
using ll=long long;
int main()
{
int n,m;
cin>>n>>m;
ll ans=0;
for(int i=1;i<=n;i++)
for(int j=1;j<=m;j++)
{
int a=min(i-1,n-i),b=min(j-1,m-j);
ans+=(a+a+1)*(b+b+1)/2;
}
cout<<ans<<endl;
return 0;
}
Details
Tip: Click on the bar to expand more detailed information
Test #1:
score: 100
Accepted
time: 1ms
memory: 3596kb
input:
1 1
output:
0
result:
ok 1 number(s): "0"
Test #2:
score: -100
Wrong Answer
time: 0ms
memory: 3484kb
input:
2 3
output:
2
result:
wrong answer 1st numbers differ - expected: '14', found: '2'