# | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
772955 | 2023-07-04T13:29:31 Z | PoonYaPat | 앵무새 (IOI11_parrots) | C++14 | 4 ms | 1304 KB |
#include "encoder.h" #include "encoderlib.h" #include <bits/stdc++.h> using namespace std; vector<int> v; void put(int x) { for (int i=0; i<8; ++i) { if (x&(1<<i)) v.push_back(1); else v.push_back(0); } } void encode(int N, int M[]) { v.clear(); for (int i=0; i<N; ++i) put(M[i]); for (int i=0; i+1<v.size(); i+=2) { //consider bit i and i+1 if (v[i]==v[i+1]) send(i+v[i]); else { send(i); if (v[i]==0) send(i); else send(i+1); } } }
Compilation message
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Correct | 1 ms | 612 KB | Output is correct |
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Correct | 2 ms | 1044 KB | Output is correct |
2 | Correct | 2 ms | 1044 KB | Output is correct |
3 | Correct | 2 ms | 1052 KB | Output is correct |
4 | Correct | 2 ms | 1044 KB | Output is correct |
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Correct | 1 ms | 1004 KB | Output is correct |
2 | Correct | 2 ms | 1044 KB | Output is correct |
3 | Correct | 3 ms | 1040 KB | Output is correct |
4 | Correct | 3 ms | 1044 KB | Output is correct |
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Correct | 2 ms | 1032 KB | Output is correct |
2 | Correct | 2 ms | 1008 KB | Output is correct |
3 | Correct | 3 ms | 1056 KB | Output is correct |
4 | Correct | 3 ms | 1200 KB | Output is correct |
5 | Correct | 3 ms | 1196 KB | Output is correct |
6 | Correct | 4 ms | 1304 KB | Output is correct |
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Partially correct | 2 ms | 1044 KB | Output is partially correct - P = 6.562500 |
2 | Partially correct | 3 ms | 1196 KB | Output is partially correct - P = 6.218750 |
3 | Incorrect | 1 ms | 724 KB | Error : Bad encoded integer |
4 | Incorrect | 1 ms | 628 KB | Error : Bad encoded integer |
5 | Incorrect | 1 ms | 652 KB | Error : Bad encoded integer |
6 | Incorrect | 0 ms | 652 KB | Error : Bad encoded integer |
7 | Incorrect | 1 ms | 652 KB | Error : Bad encoded integer |