#include<iostream>
using namespace std;
#define forn(i, n) for(int i=0; i<(int)n; ++i)
string s;
inline int encode(int a, int b, int c, int d){
return (a<<8) + (b<<2) + (c<<1) + d;
}
void solve(){
cin >> s;
if(s[0]=='c'){
int m, a; cin >> m;
forn(i, m) cin >> a;
cout << (a==1? 'B' : 'A') << endl;
}
else{
int num; cin >> num;
string ret("19");
forn(i, 3){
int dig = !(num & (1<<i));
ret.append(" ");
ret.append(to_string(encode(num&((1<<24) - (1<<(i+1))), i, dig^(s[0]=='a'), dig|(s[0]=='a'))));
}
cout << ret << endl;
}
}
int main(){
ios_base::sync_with_stdio(false);
cin.tie(NULL);
int a, t; cin >> a >> t;
while(t--) solve();
}
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
1 ms |
212 KB |
Unexpected end of file - int32 expected |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
3 ms |
340 KB |
Unexpected end of file - int32 expected |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
1378 ms |
30776 KB |
Unexpected end of file - int32 expected |
2 |
Halted |
0 ms |
0 KB |
- |