# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
985888 | simona1230 | Question (Grader is different from the original contest) (CEOI14_question_grader) | C++17 | 0 ms | 0 KiB |
This submission is migrated from previous version of oj.uz, which used different machine for grading. This submission may have different result if resubmitted.
#include <bits/stdc++.h>
#define endl "\n"
using namespace std;
int n,t;
int tp;
int x,y,q,h;
int main()
{
ios_base::sync_with_stdio(false);
cin.tie(NULL);
cout.tie(NULL);
cin>>tp;
cin>>n>>t;
if(tp==1)
{
for(int i=1;i<=t;i++)
{
cin>>x>>y;
int j=0;
while(((1<<j)&x)&&((1<<j)&y)||!((1<<j)&x)&&!((1<<j)&y))
j++;
if((1<<j)&x)j=j+1;
else j=10+j+1;
cout<<j<<endl;
}
}
if(tp==2)
{
for(int i=1;i<=t;i++)
{
cin>>q>>h;
int c1=0;
if(h>10)h-=10,c1=1;
h--;
if((1<<(h%10))&q)
{
if(c1==0)cout<<"yes"<<endl;
else cout<<"no"<<endl;
}
else
{
if(c1==0)cout<<"no"<<endl;
else cout<<"yes"<<endl;
}
}
}
return 0;
}
/*
0
0
0
1
0
0
2
5 6
1 1
4 11
2 1
3 2
5 11
2 1
*/