QOJ.ac
QOJ
ID | 题目 | 提交者 | 结果 | 用时 | 内存 | 语言 | 文件大小 | 提交时间 | 测评时间 |
---|---|---|---|---|---|---|---|---|---|
#784898 | #4953. Displacing Particles | Yarema# | AC ✓ | 0ms | 3700kb | C++20 | 611b | 2024-11-26 16:17:03 | 2024-11-26 16:17:09 |
Judging History
answer
#include <bits/stdc++.h>
using namespace std;
#define FOR(i, a, b) for(int i = (a); i < (b); i++)
#define RFOR(i, a, b) for(int i = (a) - 1; i >= (b); i--)
#define SZ(a) int(a.size())
#define ALL(a) a.begin(), a.end()
#define PB push_back
#define MP make_pair
#define F first
#define S second
typedef long long LL;
typedef vector<int> VI;
typedef vector<LL> VL;
typedef pair<int, int> PII;
typedef pair<LL, LL> PLL;
typedef double db;
int main()
{
ios::sync_with_stdio(0);
cin.tie(0);
int n, x;
cin >> n >> x;
cout << n - (__builtin_ctz(x) + 1) << '\n';
return 0;
}
详细
Test #1:
score: 100
Accepted
time: 0ms
memory: 3552kb
input:
1 1 1
output:
0
result:
ok single line: '0'
Test #2:
score: 0
Accepted
time: 0ms
memory: 3620kb
input:
4 12 4
output:
1
result:
ok single line: '1'
Test #3:
score: 0
Accepted
time: 0ms
memory: 3512kb
input:
4 3 1
output:
3
result:
ok single line: '3'
Test #4:
score: 0
Accepted
time: 0ms
memory: 3628kb
input:
2 2 2
output:
0
result:
ok single line: '0'
Test #5:
score: 0
Accepted
time: 0ms
memory: 3508kb
input:
2 3 3
output:
1
result:
ok single line: '1'
Test #6:
score: 0
Accepted
time: 0ms
memory: 3544kb
input:
1 1 1
output:
0
result:
ok single line: '0'
Test #7:
score: 0
Accepted
time: 0ms
memory: 3636kb
input:
1 1 1
output:
0
result:
ok single line: '0'
Test #8:
score: 0
Accepted
time: 0ms
memory: 3616kb
input:
5 6 18
output:
3
result:
ok single line: '3'
Test #9:
score: 0
Accepted
time: 0ms
memory: 3504kb
input:
7 100 44
output:
4
result:
ok single line: '4'
Test #10:
score: 0
Accepted
time: 0ms
memory: 3512kb
input:
7 60 4
output:
4
result:
ok single line: '4'
Test #11:
score: 0
Accepted
time: 0ms
memory: 3548kb
input:
5 14 2
output:
3
result:
ok single line: '3'
Test #12:
score: 0
Accepted
time: 0ms
memory: 3608kb
input:
8 99 117
output:
7
result:
ok single line: '7'
Test #13:
score: 0
Accepted
time: 0ms
memory: 3608kb
input:
6 16 16
output:
1
result:
ok single line: '1'
Test #14:
score: 0
Accepted
time: 0ms
memory: 3540kb
input:
8 104 152
output:
4
result:
ok single line: '4'
Test #15:
score: 0
Accepted
time: 0ms
memory: 3636kb
input:
9 154 374
output:
7
result:
ok single line: '7'
Test #16:
score: 0
Accepted
time: 0ms
memory: 3528kb
input:
10 448 960
output:
3
result:
ok single line: '3'
Test #17:
score: 0
Accepted
time: 0ms
memory: 3512kb
input:
8 92 68
output:
5
result:
ok single line: '5'
Test #18:
score: 0
Accepted
time: 0ms
memory: 3636kb
input:
8 64 192
output:
1
result:
ok single line: '1'
Test #19:
score: 0
Accepted
time: 0ms
memory: 3512kb
input:
11 1536 512
output:
1
result:
ok single line: '1'
Test #20:
score: 0
Accepted
time: 0ms
memory: 3552kb
input:
11 1792 768
output:
2
result:
ok single line: '2'
Test #21:
score: 0
Accepted
time: 0ms
memory: 3696kb
input:
11 128 384
output:
3
result:
ok single line: '3'
Test #22:
score: 0
Accepted
time: 0ms
memory: 3632kb
input:
11 1856 1344
output:
4
result:
ok single line: '4'
Test #23:
score: 0
Accepted
time: 0ms
memory: 3612kb
input:
10 35 937
output:
9
result:
ok single line: '9'
Test #24:
score: 0
Accepted
time: 0ms
memory: 3628kb
input:
12 2411 3263
output:
11
result:
ok single line: '11'
Test #25:
score: 0
Accepted
time: 0ms
memory: 3628kb
input:
12 3164 2980
output:
9
result:
ok single line: '9'
Test #26:
score: 0
Accepted
time: 0ms
memory: 3512kb
input:
12 3072 3072
output:
1
result:
ok single line: '1'
Test #27:
score: 0
Accepted
time: 0ms
memory: 3700kb
input:
14 3200 1408
output:
6
result:
ok single line: '6'
Test #28:
score: 0
Accepted
time: 0ms
memory: 3556kb
input:
12 3776 704
output:
5
result:
ok single line: '5'
Test #29:
score: 0
Accepted
time: 0ms
memory: 3628kb
input:
16 57344 8192
output:
2
result:
ok single line: '2'
Test #30:
score: 0
Accepted
time: 0ms
memory: 3508kb
input:
19 311296 311296
output:
4
result:
ok single line: '4'
Test #31:
score: 0
Accepted
time: 0ms
memory: 3636kb
input:
20 98304 98304
output:
4
result:
ok single line: '4'
Test #32:
score: 0
Accepted
time: 0ms
memory: 3700kb
input:
15 26300 12788
output:
12
result:
ok single line: '12'
Test #33:
score: 0
Accepted
time: 0ms
memory: 3624kb
input:
17 72081 8561
output:
16
result:
ok single line: '16'
Test #34:
score: 0
Accepted
time: 0ms
memory: 3628kb
input:
16 16384 49152
output:
1
result:
ok single line: '1'
Test #35:
score: 0
Accepted
time: 0ms
memory: 3700kb
input:
20 524288 524288
output:
0
result:
ok single line: '0'
Test #36:
score: 0
Accepted
time: 0ms
memory: 3568kb
input:
20 739328 940032
output:
8
result:
ok single line: '8'
Test #37:
score: 0
Accepted
time: 0ms
memory: 3552kb
input:
20 133072 326960
output:
15
result:
ok single line: '15'
Test #38:
score: 0
Accepted
time: 0ms
memory: 3624kb
input:
20 802816 442368
output:
5
result:
ok single line: '5'
Test #39:
score: 0
Accepted
time: 0ms
memory: 3508kb
input:
20 262144 262144
output:
1
result:
ok single line: '1'
Test #40:
score: 0
Accepted
time: 0ms
memory: 3636kb
input:
20 262144 786432
output:
1
result:
ok single line: '1'