# | Submission time | Handle | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
44626 | 2018-04-04T01:19:57 Z | wzy | Question (Grader is different from the original contest) (CEOI14_question_grader) | C++11 | 1889 ms | 79328 KB |
#include <bits/stdc++.h> using namespace std; vector<int> v; void putmask(){ if(v.size()) return ; for(int j = 0 ; j < (1<<12) ; j++){ int x = 0; for(int i = 0 ; i < 12 ; i++){ if(1<<i & j) x++; } if(x == 6){ v.push_back(j); } } } int encode (int n, int x, int y) { putmask(); for(int i = 0 ; i < 12 ; i++){ if((v[x] & 1<<i) && !(v[y] & 1<<i)){ return (i + 1); } } }
Compilation message
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Correct | 1857 ms | 78928 KB | Output is correct - maxh = 12 |
2 | Correct | 1889 ms | 79328 KB | Output is correct - maxh = 12 |