Submission #940703

#TimeUsernameProblemLanguageResultExecution timeMemory
940703parlimoosQuestion (Grader is different from the original contest) (CEOI14_question_grader)C++14
100 / 100
2622 ms25192 KiB
//Be Name KHODA #pragma GCC optimize("Ofast") #include<bits/stdc++.h> using namespace std; typedef long long ll; typedef long double ld; #define pb push_back #define pp pop_back #define lb lower_bound #define ub upper_bound #define cl clear #define bg begin #define arr(x) array<int , x> #define endl '\n' int md , n; int sts[925]; void init(){ int cnt = 0; for(int msk = (1 << 6) - 1 ; msk < (1 << 12) ; msk++){ if(__builtin_popcount(msk) != 6) continue; sts[cnt++] = msk; } } int encode(int n , int x , int y){ if(sts[0] == 0) init(); int bit = (sts[x] ^ (sts[x] & sts[y])); return (__builtin_ctz((bit << 1))); }
//Be Name KHODA #pragma GCC optimize("Ofast") #include<bits/stdc++.h> using namespace std; typedef long long ll; typedef long double ld; #define pb push_back #define pp pop_back #define lb lower_bound #define ub upper_bound #define cl clear #define bg begin #define arr(x) array<int , x> #define endl '\n' int md , n; int sts[925]; void init(){ int cnt = 0; for(int msk = (1 << 6) - 1 ; msk < (1 << 12) ; msk++){ if(__builtin_popcount(msk) != 6) continue; sts[cnt++] = msk; } } int decode(int n , int q , int h){ if(sts[0] == 0) init(); return ((sts[q] >> (h - 1)) & 1); }
#Verdict Execution timeMemoryGrader output
Fetching results...