QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#561942#9256. Quantum SupremacyBaneist#WA 0ms3684kbC++14690b2024-09-13 13:23:552024-09-13 13:23:56

Judging History

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

  • [2024-09-13 13:23:56]
  • 评测
  • 测评结果:WA
  • 用时:0ms
  • 内存:3684kb
  • [2024-09-13 13:23:55]
  • 提交

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;
    auto geti=[](ll n,ll b,ll a){
        ll d=((n*a+b-1)/b);
        ll r=(n+d-1)/d, i=0; while(r!=0) r>>=1,i++; return i;
    };
    ll x=geti(n,b,a);
    cout<<x<<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: 0ms
memory: 3576kb

input:

1024 1 1

output:

1

result:

ok answer is '1'

Test #2:

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

input:

1024 1 2

output:

2

result:

ok answer is '2'

Test #3:

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

input:

1 1 1

output:

1

result:

ok answer is '1'

Test #4:

score: -100
Wrong Answer
time: 0ms
memory: 3600kb

input:

1 1 2

output:

1

result:

wrong answer expected '-1', found '1'