Submission #537653

# Submission time Handle Problem Language Result Execution time Memory
537653 2022-03-15T10:57:29 Z cig32 Hedgehog Daniyar and Algorithms (IZhO19_sortbooks) C++17
0 / 100
255 ms 47276 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 = 1000000;
  set<int> v;
  for(int i=0; i<n; i++) v.insert(i);
  int j = 0;
  for(int i=0; i<50000000; 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 Incorrect 255 ms 47276 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 255 ms 47276 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 253 ms 47224 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 253 ms 47144 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 255 ms 47276 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 255 ms 47276 KB Output isn't correct
2 Halted 0 ms 0 KB -