# | Submission time | Handle | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
471661 | 2021-09-10T08:24:36 Z | TheScrasse | Question (Grader is different from the original contest) (CEOI14_question_grader) | C++14 | 4537 ms | 24176 KB |
#include <bits/stdc++.h> using namespace std; #define nl "\n" #define nf endl #define ll long long #define pb push_back #define _ << ' ' << #define INF (ll)1e18 #define mod 998244353 #define maxn 110 vector<ll> v; int encode(int n, int x, int y) { ll i, mk; if (v.empty()) { v.pb(0); for (mk = 0; mk < (1 << 12); mk++) { if (__builtin_popcount(mk) != 6) continue; v.pb(mk); } } for (i = 0; i < 12; i++) { if (((v[x] >> i) & 1) == 0) continue; if (((v[y] >> i) & 1) == 1) continue; return i + 1; } }
Compilation message
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Correct | 3616 ms | 24040 KB | Output is correct - maxh = 12 |
2 | Correct | 4537 ms | 24176 KB | Output is correct - maxh = 12 |