# |
Submission time |
Handle |
Problem |
Language |
Result |
Execution time |
Memory |
775334 |
2023-07-06T09:46:33 Z |
vjudge1 |
Rack (eJOI19_rack) |
C++17 |
|
1 ms |
328 KB |
#include <bits/stdc++.h>
using namespace std;
#define int long long
#define mid (start+end)/2
#define mod 1000000007
#define faster ios_base::sync_with_stdio(false);cin.tie(NULL);
int dizi[1000005];
int32_t main(){
faster
int n,m,tut=0;cin>>n>>m;
m--;
while(m>0){
dizi[tut]=m%2;
tut++;
m/=2;
//cout<<"fe"<<'\n';
}
for(int i=tut;i<=n;i++){
dizi[i]=0;
}
int cev=0;
//for(int i=0;i<n;i++)cout<<dizi[i]<<" ";
int k=n-1;
for(int i=0;i<n;i++){
if(dizi[i])cev+=1<<k;
cev%=mod;
k--;
}
cout<<cev+1<<'\n';
return 0;
}
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
1 ms |
324 KB |
Output is correct |
2 |
Correct |
1 ms |
212 KB |
Output is correct |
3 |
Correct |
0 ms |
212 KB |
Output is correct |
4 |
Correct |
1 ms |
212 KB |
Output is correct |
5 |
Correct |
0 ms |
212 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
1 ms |
324 KB |
Output is correct |
2 |
Correct |
1 ms |
212 KB |
Output is correct |
3 |
Correct |
0 ms |
212 KB |
Output is correct |
4 |
Correct |
1 ms |
212 KB |
Output is correct |
5 |
Correct |
0 ms |
212 KB |
Output is correct |
6 |
Correct |
0 ms |
212 KB |
Output is correct |
7 |
Correct |
0 ms |
328 KB |
Output is correct |
8 |
Correct |
0 ms |
324 KB |
Output is correct |
9 |
Correct |
0 ms |
212 KB |
Output is correct |
10 |
Correct |
1 ms |
328 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
1 ms |
324 KB |
Output is correct |
2 |
Correct |
1 ms |
212 KB |
Output is correct |
3 |
Correct |
0 ms |
212 KB |
Output is correct |
4 |
Correct |
1 ms |
212 KB |
Output is correct |
5 |
Correct |
0 ms |
212 KB |
Output is correct |
6 |
Correct |
0 ms |
212 KB |
Output is correct |
7 |
Correct |
0 ms |
328 KB |
Output is correct |
8 |
Correct |
0 ms |
324 KB |
Output is correct |
9 |
Correct |
0 ms |
212 KB |
Output is correct |
10 |
Correct |
1 ms |
328 KB |
Output is correct |
11 |
Incorrect |
0 ms |
212 KB |
Output isn't correct |
12 |
Halted |
0 ms |
0 KB |
- |