Submission #927668

#TimeUsernameProblemLanguageResultExecution timeMemory
927668MuntherCarrotcmp (balkan11_cmp)C++17
0 / 100
632 ms107032 KiB
#include <bits/stdc++.h> #include "cmp.h" using namespace std; // void bit_set(int add) // int bit_get(int add); void remember(int a){ for(int i = 0; i < 6; i++){ bit_set(a % 4 + i * 4 + 1); a /= 4; } } int compare(int b){ int dig[6]; for(int i = 0; i < 6; i++){ dig[i] = b % 4; b /= 4; } int i = 5; for(; i >= 0; i--){ int x = bit_get(dig[i] + i * 4 + 1); if(x == 0) break; } if(i == -1){ return 0; } else{ if(dig[i] == 3){ return -1; } for(int j = 0; j < 3; j++){ if(j == dig[i]) continue; int x = bit_get(j + i * 4 + 1); if(x){ return dig[i] > j ? 1 : -1; } } } return 0; } // by me
#Verdict Execution timeMemoryGrader output
Fetching results...