#include<bits/stdc++.h>
#include<ext/pb_ds/assoc_container.hpp>
using namespace std;
using namespace __gnu_pbds;
#define ll long long
#define ld long double
#define forn(i,j) for(ll i = 0; i < j; i++)
#define forrange(i,j,k) for(int i = j; i < k; ++i)
#define rof(i,j) rof(int i = j; i >= 0; --i)
#define pii pair<int,int>
#define vll vector<ll>
#define vi vector<int>
#define vvll vector<vll>
#define vvi vector<vi>
#define vb vector<bool>
#define pb push_back
#define p push
#define f first
#define s second
#define all(x) x.begin(), x.end()
#define eb emplace_back
#define debug(x) cerr << #x << " is " << x << endl;
#define MOD 1000000007
int main(){
int l,q;
cin >> l >> q;
while(q--){
string s;
ll h;
cin >> s >> h;
if(s == "alojzije"){
ll v = (1 << 20);
for(int i = 19; i >= 0; --i){
if((1 << i) & h){
v += (1 << i);
cout << v << " ";
}
}
cout << endl;
}
if(s == "benjamin"){
ll v = (1 << 20);
for(int i = 19; i >= 0; --i){
if((1 << i) & h ){
v += (1 << i);
}
if(!((1 << i) & h)){
ll m = (1 << i);
cout << v + m << " ";
}
}
cout << endl;
}
if(s == "cecilija"){
int t = 0;
while(h--){
int a;
cin >> a;
if(a > 1){
t++;
}
}
if(t == 0){
cout << "B" << endl;
}
else{
cout << "A" << endl;
}
}
}
}
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Incorrect |
1 ms |
344 KB |
Integer parameter [name=l_1] equals to 1048577, violates the range [0, 200] |
2 |
Halted |
0 ms |
0 KB |
- |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Incorrect |
5 ms |
344 KB |
Integer parameter [name=l_1] equals to 1048577, violates the range [0, 110] |
2 |
Halted |
0 ms |
0 KB |
- |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Incorrect |
2430 ms |
81772 KB |
Integer parameter [name=l_1] equals to 1048577, violates the range [0, 20] |
2 |
Halted |
0 ms |
0 KB |
- |