| # | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
|---|---|---|---|---|---|---|---|
| 1295362 | lucasdmy | 앵무새 (IOI11_parrots) | C++20 | 0 ms | 0 KiB |
#include "encoder.h"
#include "encoderlib.h"
#include <bits/stdc++.h>
using namespace std;
void encode(int n, vector<int>m){
for(int k=0;k<n;k++){
int p=7;
while(m[k]!=0){
if(m[k]>=(1<<p)){
m[k]-=(1<<p);
send(10*k+p);
}
p--;
}
}
}
#include "decoder.h"
#include "decoderlib.h"
#include <bits/stdc++.h>
using namespace std;
void decode(int n, int l, vector<int>x){
vector<int>resp(n);
for(int k=0;k<l;k++){
int aux=x[k]/10;
resp[aux]+=(1>>(x[k]%10));
}
for(int k=0;k<n;k++){
output(resp[k]);
}
}
