# | Submission time | Handle | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
236881 | 2020-06-03T15:57:53 Z | EJOI2019Andrew | Rack (eJOI19_rack) | C++14 | 4 ms | 384 KB |
#include<bits/stdc++.h> using namespace std; int ans; int rack(int n,int k) { if(k<=1) return ans; if(k%2) { ans*=2; rack(n/2,k/2); } else { ans*=2; ++ans; rack(n/2,k/2); } } int main() { ios_base::sync_with_stdio(0); cin.tie(0); cout.tie(0); int n,k; cin>>n>>k; ans=1; cout<<rack(n,k); }
Compilation message
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Incorrect | 4 ms | 384 KB | Output isn't correct |
2 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Incorrect | 4 ms | 384 KB | Output isn't correct |
2 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Incorrect | 4 ms | 384 KB | Output isn't correct |
2 | Halted | 0 ms | 0 KB | - |