# |
Submission time |
Handle |
Problem |
Language |
Result |
Execution time |
Memory |
959897 |
2024-04-09T09:44:11 Z |
pcc |
Mensza (COI22_mensza) |
C++17 |
|
1 ms |
596 KB |
#include <bits/stdc++.h>
using namespace std;
#pragma GCC optimize("O3,unroll-loops")
#pragma GCC target("avx2,popcnt,sse4")
#define pii pair<int,int>
#define fs first
#define sc second
#define ll long long
int L;
namespace SA{
vector<int> v;
void GO(int n){
v.clear();
for(int i = 0;i<10;i++){
if(n&(1<<i)){
for(int j = 0;j<i*2+1;j++)v.push_back(i*2+1);
}
}
cout<<v.size()<<' ';for(auto &i:v)cout<<i<<' ';cout<<'\n';
return;
}
}
namespace SB{
vector<int> v;
void GO(int n){
v.clear();
for(int i = 0;i<10;i++){
if(n&(1<<i)){
for(int j = 0;j<i*2+2;j++)v.push_back(i*2+2);
}
}
cout<<v.size()<<' ';for(auto &i:v)cout<<i<<' ';cout<<'\n';
return;
}
}
namespace SC{
void GO(int n){
int a = 0,b = 0;
for(int i = 0;i<n;i++){
int k;
cin>>k;
if(k&1)a^=1<<(k/2);
else b ^= 1<<(k/2-1);
}
cout<<(a>b?"A\n":"B\n");
return;
}
}
int main(){
ios::sync_with_stdio(0);cin.tie(0);cout.tie(0);
int t;
cin>>t;
while(t--){
string s;
int n;
cin>>s>>n;
if(s[0] == 'a')SA::GO(n);
else if(s[0] == 'b')SB::GO(n);
else SC::GO(n);
}
}
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
1 ms |
344 KB |
Expected integer, but "B" found |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
0 ms |
596 KB |
Expected integer, but "B" found |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
0 ms |
344 KB |
Expected integer, but "B" found |
2 |
Halted |
0 ms |
0 KB |
- |