Submission #1142224

#TimeUsernameProblemLanguageResultExecution timeMemory
1142224Aria_lix19cmp (balkan11_cmp)C++20
Compilation error
0 ms0 KiB
#include "bits/cmp.h" #include "bits/stdc++.h" using namespace std; vector<vector<int>>allmemory(6), allmemory2(6); vector<int> turnto4(int n){ vector<int>base4; int y = 6; while(y--){ base4.push_back(n%4); n /= 4; } reverse(base4.begin(),base4.end()); return base4; } int turnto10(vector<int>&n){ int num = 0; for(int i = 0; i < n.size(); i++){ num += pow(4, n.size()-i-1)*n[i]; } return num; } vector<int>h, h2; void remember(int a){ h = turnto4(a); for(int i = 0; i < 6; i++){ allmemory[i].resize(pow(4, i+1)); } vector<int>hh; for(int i = 0; i < 6; i++){ hh.push_back(h[i]); allmemory[i][turnto10(hh)] = 1; } bit_set(13); } int compare(int b){ for(int i = 0; i < 6; i++){ allmemory2[i].resize(pow(4, i+1)); } h2 = turnto4(b); vector<int>hh; for(int i = 0; i < 6; i++){ hh.push_back(h2[i]); allmemory2[i][turnto10(hh)] = 1; } int l = 0, r = 5, mid; while(l <= r){ mid = (l+r)/2; if(allmemory[mid] != allmemory2[mid]){ r = mid-1; } else{ l = mid+1; } } if(l == 6) return 0; else if(h2[l] == 0) return -1; else if(h2[l] == 3) return 1; else if(h2[l] == 2){ if(h[l] == 3) return -1; else return 1; } else{ if(h[l] == 0) return 1; else return -1; } return bit_get(13); }

Compilation message (stderr)

cmp.cpp:1:10: fatal error: bits/cmp.h: No such file or directory
    1 | #include "bits/cmp.h"
      |          ^~~~~~~~~~~~
compilation terminated.