QOJ.ac
QOJ
ID | 题目 | 提交者 | 结果 | 用时 | 内存 | 语言 | 文件大小 | 提交时间 | 测评时间 |
---|---|---|---|---|---|---|---|---|---|
#561962 | #9256. Quantum Supremacy | Baneist# | TL | 0ms | 3648kb | C++14 | 584b | 2024-09-13 13:37:20 | 2024-09-13 13:37:21 |
Judging History
answer
#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using pii = pair<int,int>;
using piii = pair<pii,int>;
#define mp(a,b) make_pair(a,b)
#define fi first
#define se second
#define rep(i,a,b) for(int i=a;i<=b;i++)
#define per(i,a,b) for(int i=a;i>=b;i--)
const ll N = 1e3+3;
void solve(){
ll n,a,b;cin>>n>>a>>b;
ll q=0;while((1<<q)*a<=b)q++;
if(q>n) q=-1;
cout<<q<<endl;
}
void init(){
}
int main(){
ios::sync_with_stdio(false), cin.tie(0);
init();
//int t;cin>>t;while(t--)
solve();
return 0;
}
详细
Test #1:
score: 100
Accepted
time: 0ms
memory: 3648kb
input:
1024 1 1
output:
1
result:
ok answer is '1'
Test #2:
score: 0
Accepted
time: 0ms
memory: 3604kb
input:
1024 1 2
output:
2
result:
ok answer is '2'
Test #3:
score: 0
Accepted
time: 0ms
memory: 3644kb
input:
1 1 1
output:
1
result:
ok answer is '1'
Test #4:
score: 0
Accepted
time: 0ms
memory: 3600kb
input:
1 1 2
output:
-1
result:
ok answer is '-1'
Test #5:
score: 0
Accepted
time: 0ms
memory: 3524kb
input:
10 2 1
output:
0
result:
ok answer is '0'
Test #6:
score: -100
Time Limit Exceeded
input:
1000000000000000000 1 1000000000000000000