제출 #1232299

#제출 시각아이디문제언어결과실행 시간메모리
1232299emptypringlescanMensza (COI22_mensza)C++17
0 / 100
5095 ms71588 KiB
#include <bits/stdc++.h> using namespace std; int main(){ ios::sync_with_stdio(0); cin.tie(0); int l; cin >> l; int q; cin >> q; while(q--){ string cmd; cin >> cmd; if(cmd[0]=='a'){ int x; cin >> x; cout << __builtin_popcount(x) << ' '; x^=1<<19; for(int i=18; i>=0; i--){ int yey=x>>i; if(yey&1) cout << (yey^1) << ' '; } cout << '\n'; } else if(cmd[0]=='b'){ int x; cin >> x; x^=1<<19; cout << 20 << ' '; for(int i=19; i>=0; i--){ int yey=x>>i; cout << yey << ' '; } cout << '\n'; } else{ int n; cin >> n; int x; for(int i=0; i<n; i++){ cin >> x; } if(x==1) cout << "B" << '\n'; else cout << "A" << '\n'; } } }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...