Sponsors

Tag: problem: (B) Karen and Coffee Solution In C/C++

Codeforces Round #419 (Div....

#include <bits/stdc++.h> using namespace std; const int N=200007; int n,k,q,a,b,p,c,i; int main(){ cin>>n>>k>>q; for(i=0;i<n;i++)cin>>a>>b,p++,p--; for(i=1;i<N;i++)p+=p,c+=c+(p>=k); for(i=0;i<q;i++){cin>>a>>b;cout<<c-c<<'n'; } }

Advertisement

spot_img