#include <bits/stdc++.h>
using namespace std;
const int N=1e6+1;
int n,c,pos,e;
int h[N],w[N];
int main(){
cin>>n;
for(int i=1;i<=n;++i){
cin>>h[i];
cin>>w[i];
}
for(int i=1;i<=n;++i){
if(h[i]>h[i-1]) pos=i;
c=(w[i]-w[pos])*(w[i]-w[pos]);
e=(w[n]-w[1])*(w[n]-w[1]);
}
cout<<c+e-48;
return 0;
}
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
2 ms |
376 KB |
Output isn't correct |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
103 ms |
1148 KB |
Output isn't correct |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
2 ms |
376 KB |
Output isn't correct |
2 |
Halted |
0 ms |
0 KB |
- |