# | Submission time | Handle | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
370968 | 2021-02-25T09:56:00 Z | FatihSolak | Unija (COCI17_unija) | C++17 | 24 ms | 512 KB |
#include <bits/stdc++.h> #define N 10000005 using namespace std; int arr[N]; int main(){ ios_base::sync_with_stdio(false); cin.tie(NULL); freopen("in.txt","r",stdin); freopen("out.txt","w",stdout); int n; cin >> n; for(int i=0;i<n;i++){ int a,b; cin >> a >> b; arr[a/2] = max(arr[a/2],b); } long long ans = 0; int maxi = 0; for(int i=N-1;i>0;i--){ maxi = max(maxi,arr[i]); ans+=maxi; } cout << ans*2; }
Compilation message
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Incorrect | 20 ms | 492 KB | Output isn't correct |
2 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Incorrect | 20 ms | 492 KB | Output isn't correct |
2 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Incorrect | 20 ms | 492 KB | Output isn't correct |
2 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Incorrect | 20 ms | 492 KB | Output isn't correct |
2 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Incorrect | 20 ms | 492 KB | Output isn't correct |
2 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Incorrect | 20 ms | 492 KB | Output isn't correct |
2 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Incorrect | 22 ms | 496 KB | Output isn't correct |
2 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Incorrect | 24 ms | 492 KB | Output isn't correct |
2 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Incorrect | 20 ms | 512 KB | Output isn't correct |
2 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Incorrect | 21 ms | 492 KB | Output isn't correct |
2 | Halted | 0 ms | 0 KB | - |