QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#561965#9256. Quantum SupremacyBaneist#AC ✓1ms3724kbC++14586b2024-09-13 13:37:592024-09-13 13:37:59

Judging History

你现在查看的是最新测评结果

  • [2024-09-13 13:37:59]
  • 评测
  • 测评结果:AC
  • 用时:1ms
  • 内存:3724kb
  • [2024-09-13 13:37:59]
  • 提交

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((1LL<<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;
}

Details

Tip: Click on the bar to expand more detailed information

Test #1:

score: 100
Accepted
time: 1ms
memory: 3648kb

input:

1024 1 1

output:

1

result:

ok answer is '1'

Test #2:

score: 0
Accepted
time: 0ms
memory: 3524kb

input:

1024 1 2

output:

2

result:

ok answer is '2'

Test #3:

score: 0
Accepted
time: 0ms
memory: 3712kb

input:

1 1 1

output:

1

result:

ok answer is '1'

Test #4:

score: 0
Accepted
time: 0ms
memory: 3668kb

input:

1 1 2

output:

-1

result:

ok answer is '-1'

Test #5:

score: 0
Accepted
time: 0ms
memory: 3704kb

input:

10 2 1

output:

0

result:

ok answer is '0'

Test #6:

score: 0
Accepted
time: 0ms
memory: 3648kb

input:

1000000000000000000 1 1000000000000000000

output:

60

result:

ok answer is '60'

Test #7:

score: 0
Accepted
time: 0ms
memory: 3668kb

input:

1000000000000000000 1000000000000000000 1000000000000000000

output:

1

result:

ok answer is '1'

Test #8:

score: 0
Accepted
time: 0ms
memory: 3528kb

input:

1000000000000000000 500000000000000000 1000000000000000000

output:

2

result:

ok answer is '2'

Test #9:

score: 0
Accepted
time: 0ms
memory: 3620kb

input:

1000000000000000000 500000000000000001 1000000000000000000

output:

1

result:

ok answer is '1'

Test #10:

score: 0
Accepted
time: 0ms
memory: 3664kb

input:

1000000000000000000 499999999999999999 1000000000000000000

output:

2

result:

ok answer is '2'

Test #11:

score: 0
Accepted
time: 0ms
memory: 3628kb

input:

1000000000000000000 1 576460752303423488

output:

60

result:

ok answer is '60'

Test #12:

score: 0
Accepted
time: 0ms
memory: 3644kb

input:

1000000000000000000 1 576460752303423487

output:

59

result:

ok answer is '59'

Test #13:

score: 0
Accepted
time: 0ms
memory: 3664kb

input:

1000000000000000000 1 576460752303423489

output:

60

result:

ok answer is '60'

Test #14:

score: 0
Accepted
time: 0ms
memory: 3588kb

input:

1 1 576460752303423488

output:

-1

result:

ok answer is '-1'

Test #15:

score: 0
Accepted
time: 1ms
memory: 3712kb

input:

1 1 576460752303423487

output:

-1

result:

ok answer is '-1'

Test #16:

score: 0
Accepted
time: 0ms
memory: 3724kb

input:

2 1 576460752303423488

output:

-1

result:

ok answer is '-1'

Test #17:

score: 0
Accepted
time: 0ms
memory: 3592kb

input:

2 1 576460752303423487

output:

-1

result:

ok answer is '-1'

Test #18:

score: 0
Accepted
time: 0ms
memory: 3644kb

input:

58 1 576460752303423488

output:

-1

result:

ok answer is '-1'

Test #19:

score: 0
Accepted
time: 0ms
memory: 3632kb

input:

58 1 576460752303423487

output:

-1

result:

ok answer is '-1'

Test #20:

score: 0
Accepted
time: 0ms
memory: 3628kb

input:

59 1 576460752303423488

output:

-1

result:

ok answer is '-1'

Test #21:

score: 0
Accepted
time: 0ms
memory: 3596kb

input:

59 1 576460752303423487

output:

59

result:

ok answer is '59'

Test #22:

score: 0
Accepted
time: 0ms
memory: 3704kb

input:

60 1 576460752303423488

output:

60

result:

ok answer is '60'

Test #23:

score: 0
Accepted
time: 0ms
memory: 3644kb

input:

60 1 576460752303423487

output:

59

result:

ok answer is '59'

Test #24:

score: 0
Accepted
time: 0ms
memory: 3580kb

input:

3479 1234 123404

output:

7

result:

ok answer is '7'

Test #25:

score: 0
Accepted
time: 0ms
memory: 3636kb

input:

5005050 100103432 1384729384732

output:

14

result:

ok answer is '14'

Test #26:

score: 0
Accepted
time: 0ms
memory: 3720kb

input:

777 77777 777777777777

output:

24

result:

ok answer is '24'

Test #27:

score: 0
Accepted
time: 0ms
memory: 3720kb

input:

100 3814697265625 1000000000000000000

output:

19

result:

ok answer is '19'

Test #28:

score: 0
Accepted
time: 0ms
memory: 3652kb

input:

100 3814697265625 999999999999999999

output:

18

result:

ok answer is '18'

Extra Test:

score: 0
Extra Test Passed