Submission #537656

# Submission time Handle Problem Language Result Execution time Memory
537656 2022-03-15T10:58:40 Z cig32 Hedgehog Daniyar and Algorithms (IZhO19_sortbooks) C++17
0 / 100
1777 ms 262144 KB
#include "bits/stdc++.h"
using namespace std;
const int MAXN = 1e6 + 10;
const int MOD = 1e9 + 7;
 
mt19937_64 rng((int)std::chrono::steady_clock::now().time_since_epoch().count());
int rnd(int x, int y) {
  int u = uniform_int_distribution<int>(x, y)(rng); return u;
}
 
void solve(int tc) {
  int n = 10000000;
  set<int> v;
  for(int i=0; i<n; i++) v.insert(i);
  int j = 0;
  for(int i=0; i<10000000; i++) {
    auto it = v.lower_bound(j);
    j = (j == n-1 ? 0 : j+1);
  }
}
int32_t main(){
  ios::sync_with_stdio(0); cin.tie(0);
  int t = 1; //cin >> t;
  for(int i=1; i<=t; i++) solve(i);
}

Compilation message

sortbooks.cpp: In function 'void solve(int)':
sortbooks.cpp:17:10: warning: variable 'it' set but not used [-Wunused-but-set-variable]
   17 |     auto it = v.lower_bound(j);
      |          ^~
# Verdict Execution time Memory Grader output
1 Runtime error 1705 ms 262144 KB Execution killed with signal 9
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Runtime error 1705 ms 262144 KB Execution killed with signal 9
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Runtime error 1777 ms 262144 KB Execution killed with signal 9
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Runtime error 1693 ms 262144 KB Execution killed with signal 9
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Runtime error 1705 ms 262144 KB Execution killed with signal 9
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Runtime error 1705 ms 262144 KB Execution killed with signal 9
2 Halted 0 ms 0 KB -