QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#370467#5038. Cityzzuqy#WA 0ms3832kbC++11550b2024-03-29 08:36:552024-03-29 08:36:55

Judging History

你现在查看的是最新测评结果

  • [2024-03-29 08:36:55]
  • 评测
  • 测评结果:WA
  • 用时:0ms
  • 内存:3832kb
  • [2024-03-29 08:36:55]
  • 提交

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'