# | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
900284 | 2024-01-08T03:59:18 Z | ar88lo | 앵무새 (IOI11_parrots) | C++14 | 9 ms | 1376 KB |
#include "encoder.h" #include "encoderlib.h" #include <bits/stdc++.h> using namespace std; vector<int> tovec(int a){ vector<int> ret; for(int i = 0; i < 8; i++){ ret.push_back(a%2); a/=2; } return ret; } void encode(int N, int M[]){ vector<int> v; for(int i = N-1; i >= 0; i--){ vector<int> temp = tovec(M[i]); for(auto t:temp){ v.push_back(t); } } reverse(v.begin(), v.end()); int ind = 0; for(int i = 0; i <v.size(); i+=2){ if(v[i] == 1 && v[i+1] == 1){ send(ind); send(ind); send(ind); } if(v[i] == 1 && v[i+1] == 0){ send(ind); send(ind); } if(v[i] == 0 && v[i+1] == 1){ send(ind); } ind++; } }
Compilation message
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Correct | 0 ms | 796 KB | Output is correct |
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Incorrect | 0 ms | 784 KB | Error : Encoded message too long |
2 | Halted | 0 ms | 0 KB | - |
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Incorrect | 1 ms | 788 KB | Error : Encoded message too long |
2 | Halted | 0 ms | 0 KB | - |
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Incorrect | 0 ms | 784 KB | Error : Encoded message too long |
2 | Halted | 0 ms | 0 KB | - |
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Partially correct | 2 ms | 1312 KB | Output is partially correct - P = 12.000000 |
2 | Partially correct | 5 ms | 1332 KB | Output is partially correct - P = 12.000000 |
3 | Partially correct | 4 ms | 1332 KB | Output is partially correct - P = 12.000000 |
4 | Partially correct | 5 ms | 1356 KB | Output is partially correct - P = 12.000000 |
5 | Partially correct | 8 ms | 1376 KB | Output is partially correct - P = 12.000000 |
6 | Partially correct | 9 ms | 1376 KB | Output is partially correct - P = 12.000000 |
7 | Partially correct | 8 ms | 1376 KB | Output is partially correct - P = 12.000000 |