Submission #537652

# Submission time Handle Problem Language Result Execution time Memory
537652 2022-03-15T10:56:58 Z cig32 Hedgehog Daniyar and Algorithms (IZhO19_sortbooks) C++17
0 / 100
273 ms 47232 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<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 Incorrect 272 ms 47180 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 272 ms 47180 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 255 ms 47232 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 273 ms 47208 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 272 ms 47180 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 272 ms 47180 KB Output isn't correct
2 Halted 0 ms 0 KB -