Submission #1034201

# Submission time Handle Problem Language Result Execution time Memory
1034201 2024-07-25T10:32:26 Z vjudge1 cmp (balkan11_cmp) C++17
0 / 100
489 ms 82512 KB
#include "cmp.h"
#include <bits/stdc++.h>
using namespace std;

mt19937 rng(time(nullptr) + 69);

void remember(int n) {
  for (int i = 1; i <= 11; i++) {
    if ((n >> i) & 1) bit_set(i+1);
  }
}

int compare(int n) {
  for (int i = 11; i >= 1; i--) {
    int x = bit_get(i+1);
    int y = (n >> i) & 1;
    
    if (x > y) return -1;
    else if (x < y) return 1;
  }

  return rng() % 3 - 1;
}

# Verdict Execution time Memory Grader output
1 Incorrect 489 ms 82512 KB ZERO POINTS: For a=2215 and b=2214, correct answer is -1, got 0