QOJ.ac
QOJ
ID | 题目 | 提交者 | 结果 | 用时 | 内存 | 语言 | 文件大小 | 提交时间 | 测评时间 |
---|---|---|---|---|---|---|---|---|---|
#412123 | #8669. 正方形计数 | ANIG# | 0 | 2ms | 3544kb | C++14 | 418b | 2024-05-16 08:44:30 | 2024-05-16 08:44:30 |
answer
#include <bits/stdc++.h>
using namespace std;
#define int long long
const int inf=1e18;
int n,mnx=inf,mny=inf,mxx=-inf,mxy=-inf,res;
signed main(){
cin>>n;
for(int i=1;i<=n;i++){
int x,y;
cin>>x>>y;
mnx=min(mnx,x);
mny=min(mny,y);
mxx=max(mxx,x);
mxy=max(mxy,y);
}
int a=mxx-mnx,b=mxy-mny;
for(int i=1;i<=a;i++){
for(int j=1;j<=b;j++){
res+=(i-1)*(j-1);
}
}
cout<<res;
}
详细
Subtask #1:
score: 0
Wrong Answer
Test #1:
score: 0
Wrong Answer
time: 2ms
memory: 3544kb
input:
4 131 603 131 1828 1919 1828 1919 603
output:
1197704226600
result:
wrong answer 1st numbers differ - expected: '361182910200', found: '1197704226600'
Subtask #2:
score: 0
Wrong Answer
Test #6:
score: 0
Wrong Answer
time: 0ms
memory: 3488kb
input:
3 131 603 131 1828 1919 603
output:
1197704226600
result:
wrong answer 1st numbers differ - expected: '63739309181', found: '1197704226600'
Subtask #3:
score: 0
Wrong Answer
Test #11:
score: 0
Wrong Answer
time: 0ms
memory: 3480kb
input:
8 0 13 4 15 15 15 15 6 13 1 12 0 5 0 0 6
output:
11025
result:
wrong answer 1st numbers differ - expected: '4047', found: '11025'
Subtask #4:
score: 0
Skipped
Dependency #3:
0%
Subtask #5:
score: 0
Skipped
Dependency #4:
0%
Subtask #6:
score: 0
Skipped
Dependency #1:
0%