Submission #660817

# Submission time Handle Problem Language Result Execution time Memory
660817 2022-11-23T09:35:57 Z 600Mihnea cmp (balkan11_cmp) C++17
0 / 100
1162 ms 82424 KB
#include "cmp.h"

#include <bits/stdc++.h>

using namespace std;

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

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

# Verdict Execution time Memory Grader output
1 Incorrect 1162 ms 82424 KB ZERO POINTS: more than 20 accesses in the worst case