# | Submission time | Handle | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
631186 | 2022-08-17T18:53:15 Z | smartmonky | XORanges (eJOI19_xoranges) | C++14 | 10 ms | 16748 KB |
#include <bits/stdc++.h> #define ll long long #define pb push_back using namespace std; main(){ int n,k; cin >>n >>k; int x=(1 << n); vector <int> v(x*2); vector <int> ans(x*2); v[1]=1; ans[1]=1; v[2]=x/2+1; ans[2]=(v[2]); int cnt=2; int s=3; for(int i=x/4;i>=1;i/=2){ for(int j=1;j<=cnt;j++){ v[cnt+j]=v[j]+i; ans[s]=v[j]+i; s++; } cnt*=2; } cout<<ans[k]; }
Compilation message
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Incorrect | 1 ms | 212 KB | Output isn't correct |
2 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Incorrect | 10 ms | 16748 KB | Output isn't correct |
2 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Incorrect | 1 ms | 212 KB | Output isn't correct |
2 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Runtime error | 1 ms | 432 KB | Execution killed with signal 11 |
2 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Incorrect | 1 ms | 212 KB | Output isn't correct |
2 | Halted | 0 ms | 0 KB | - |