Submission #666055

# Submission time Handle Problem Language Result Execution time Memory
666055 2022-11-27T15:01:22 Z MilosMilutinovic cmp (balkan11_cmp) C++14
0 / 100
0 ms 208 KB
#include "cmp.h"
#include <bits/stdc++.h>

using namespace std;

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

int compare(int b) {
  for (int i = 11; i >= 0; i--) {
    int is = bit_get(i);
    if ((b >> i & 1) == is) {
      continue;
    }
    if ((b >> i & 1) < is) {
      return -1;
    } else {
      return 1;
    }
  }
  return 0;
}

# Verdict Execution time Memory Grader output
1 Incorrect 0 ms 208 KB ZERO POINTS: bit_set with addr out of range 0