Submission #1111866

# Submission time Handle Problem Language Result Execution time Memory
1111866 2024-11-13T08:32:06 Z vjudge1 Rack (eJOI19_rack) C++17
0 / 100
1 ms 336 KB
#include <bits/stdc++.h>
#define int long long

using namespace std;

int32_t main(){
	int n,k;
	cin>>n>>k;
	int z=pow(2,n);
	map<int,int> mp;
	bool first=true;
	int cift=0;
	for(int i=1; i<=z; i+=2){
		if(i<=z/2){
			mp[i]=i;
			mp[i+1]=z/2+i;
		}else{
			if(first){
				cift=2;
				first=false;
			}
			mp[i]=cift;
			mp[i+1]=z/2+cift;
			cift+=2;
		}
	}
	cout<<mp[k]%1000000007<<"\n";

}
# Verdict Execution time Memory Grader output
1 Correct 1 ms 336 KB Output is correct
2 Correct 1 ms 336 KB Output is correct
3 Correct 1 ms 336 KB Output is correct
4 Correct 1 ms 336 KB Output is correct
5 Incorrect 1 ms 336 KB Output isn't correct
6 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Correct 1 ms 336 KB Output is correct
2 Correct 1 ms 336 KB Output is correct
3 Correct 1 ms 336 KB Output is correct
4 Correct 1 ms 336 KB Output is correct
5 Incorrect 1 ms 336 KB Output isn't correct
6 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Correct 1 ms 336 KB Output is correct
2 Correct 1 ms 336 KB Output is correct
3 Correct 1 ms 336 KB Output is correct
4 Correct 1 ms 336 KB Output is correct
5 Incorrect 1 ms 336 KB Output isn't correct
6 Halted 0 ms 0 KB -