# |
Submission time |
Handle |
Problem |
Language |
Result |
Execution time |
Memory |
848350 |
2023-09-12T08:04:18 Z |
vjudge1 |
Unija (COCI17_unija) |
C++17 |
|
39 ms |
65536 KB |
#include <bits/stdc++.h>
using namespace std;
int main()
{
long long n,cnt=0;
cin>>n;
// vector<pair<long long,long long>>v(n);
// map<int,int>p;
long long p[10000001]={};
for(int i=0 ; i<n ; i++)
{
long long x,y;
cin>>x>>y;
y/=2; x/=2;
// v[i]={x,y};
p[y]=max(p[y],x);
}
for(int i=10000001-1 ; i>0 ; i--) p[i]=max(p[i],p[i+1]);
// for(auto i:p) cnt+=i.second;
for(int i=0 ; i<10000001 ; i++)cnt+=p[i];
cout<<cnt*4<<endl;
}
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Runtime error |
35 ms |
65536 KB |
Execution killed with signal 9 |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Runtime error |
34 ms |
65536 KB |
Execution killed with signal 9 |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Runtime error |
35 ms |
65536 KB |
Execution killed with signal 9 |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Runtime error |
35 ms |
65536 KB |
Execution killed with signal 9 |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Runtime error |
35 ms |
65536 KB |
Execution killed with signal 9 |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Runtime error |
34 ms |
65536 KB |
Execution killed with signal 9 |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Runtime error |
34 ms |
65536 KB |
Execution killed with signal 9 |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Runtime error |
39 ms |
65536 KB |
Execution killed with signal 9 |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Runtime error |
35 ms |
65536 KB |
Execution killed with signal 9 |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Runtime error |
35 ms |
65536 KB |
Execution killed with signal 9 |
2 |
Halted |
0 ms |
0 KB |
- |