# |
Submission time |
Handle |
Problem |
Language |
Result |
Execution time |
Memory |
96678 |
2019-02-10T19:38:10 Z |
Rouge_Hugo |
Mate (COCI18_mate) |
C++14 |
|
32 ms |
632 KB |
#include <bits/stdc++.h>
using namespace std;
long long a[10000009];
int main()
{
ios_base::sync_with_stdio(false);
cin.tie(NULL);
long long x,y;
int n;cin>>n;
for(int i=0;i<n;i++)
{
cin>>x>>y;
x/=2;
y/=2;
a[y]=max(a[y],x);
}
long long sum=0;
for(int i=1;i<10000007;i++)
{
if (a[i]>a[i-1])
{
sum+=(a[i]-a[i-1])*(i-1)+a[i];
}
else sum+=a[i];
}
cout<<sum*4;
return 0;
}
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
23 ms |
504 KB |
Output isn't correct |
2 |
Incorrect |
23 ms |
504 KB |
Output isn't correct |
3 |
Incorrect |
23 ms |
504 KB |
Output isn't correct |
4 |
Incorrect |
23 ms |
516 KB |
Output isn't correct |
5 |
Incorrect |
23 ms |
504 KB |
Output isn't correct |
6 |
Incorrect |
24 ms |
504 KB |
Output isn't correct |
7 |
Incorrect |
24 ms |
504 KB |
Output isn't correct |
8 |
Incorrect |
24 ms |
504 KB |
Output isn't correct |
9 |
Incorrect |
26 ms |
504 KB |
Output isn't correct |
10 |
Incorrect |
32 ms |
632 KB |
Output isn't correct |