# | Submission time | Handle | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
126824 | 2019-07-08T13:33:11 Z | MohamedAhmed04 | Examination (JOI19_examination) | C++14 | 3000 ms | 143772 KB |
#include <bits/stdc++.h> #include <ext/pb_ds/assoc_container.hpp> using namespace __gnu_pbds; using namespace std; const int MAX = 1e5 + 5 ; const int MAX2 = 1e5 ; map< pair<int , int> , int>bit ; void update(int x , int y , int val) { while(x < MAX2) { int y1 = y ; while(y1 < MAX2) { bit[{x , y1}] += val ; y1 += (y1 & -y1) ; } x += (x & -x) ; } return ; } int query(int x , int y) { int ans = 0 ; while(x > 0) { int y1 = y ; while(y1 > 0) { ans += bit[{x , y1}] ; y1 -= (y1 & -y1) ; } x -= (x & -x) ; } return ans ; } int main() { int n , q ; scanf("%d %d" , &n , &q) ; int a[n] , b[n] ; for(int i = 0 ; i < n ; ++i) { scanf("%d %d" , &a[i] , &b[i]) ; update(a[i] , b[i] , 1) ; } while(q--) { int x , y , z ; scanf("%d %d %d" , &x , &y , &z) ; int ay_habl = 3412452 ; printf("%d\n" , ay_habl) ; } return 0 ; }
Compilation message
# | 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 | Execution timed out | 3029 ms | 143772 KB | Time limit exceeded |
2 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Execution timed out | 3029 ms | 143772 KB | Time limit exceeded |
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 | - |