QOJ.ac
QOJ
ID | Problem | Submitter | Result | Time | Memory | Language | File size | Submit time | Judge time |
---|---|---|---|---|---|---|---|---|---|
#414601 | #8669. 正方形计数 | Network_Error | 0 | 15ms | 3612kb | C++14 | 862b | 2024-05-19 11:31:03 | 2024-05-19 11:31:04 |
Judging History
answer
#include<bits/stdc++.h>
using namespace std;
#define pb push_back
#define pii pair<int,int>
#define piii tuple<int,int,int>
#define mp make_pair
#define mt make_tuple
#define fi first
#define x first
#define y second
#define se second
#define ins insert
#define let(a...) int a;tie(a)
#define deb(var) cerr<<#var<<'='<<(var)<<"; "
#define int long long
const int W=2000;
int n;
pii g[10];
void acrec(){
int w=g[3].x-g[2].x,h=g[2].y-g[1].y,ans=0;
for(int x=-W;x<=W;x++){
for(int y=-W;y<=W;y++){
int b=x+y;
ans+=max(w-b+1,0ll)*max(h-b+1,0ll);
}
} cout<<ans<<'\n';
}
void actri(){
}
void work(){
cin>>n;
for(int i=1;i<=n;i++)
cin>>g[i].x>>g[i].y;
if(n==4)return acrec();
if(n==3)return actri();
}
signed main(){
ios::sync_with_stdio(0),
cin.tie(0),cout.tie(0);
int T=1;while(T--)work();
}
Details
Tip: Click on the bar to expand more detailed information
Subtask #1:
score: 0
Wrong Answer
Test #1:
score: 0
Wrong Answer
time: 15ms
memory: 3612kb
input:
4 131 603 131 1828 1919 1828 1919 603
output:
74883430797614
result:
wrong answer 1st numbers differ - expected: '361182910200', found: '74883430797614'
Subtask #2:
score: 0
Wrong Answer
Test #6:
score: 0
Wrong Answer
time: 0ms
memory: 3596kb
input:
3 131 603 131 1828 1919 603
output:
result:
wrong answer Answer contains longer sequence [length = 1], but output contains 0 elements
Subtask #3:
score: 0
Wrong Answer
Test #11:
score: 0
Wrong Answer
time: 1ms
memory: 3604kb
input:
8 0 13 4 15 15 15 15 6 13 1 12 0 5 0 0 6
output:
result:
wrong answer Answer contains longer sequence [length = 1], but output contains 0 elements
Subtask #4:
score: 0
Skipped
Dependency #3:
0%
Subtask #5:
score: 0
Skipped
Dependency #4:
0%
Subtask #6:
score: 0
Skipped
Dependency #1:
0%