Submission #660817

#TimeUsernameProblemLanguageResultExecution timeMemory
660817600Mihnea비교 (balkan11_cmp)C++17
0 / 100
1162 ms82424 KiB
#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 timeMemoryGrader output
Fetching results...