제출 #1325404

#제출 시각아이디문제언어결과실행 시간메모리
1325404adiyer앵무새 (IOI11_parrots)C++20
52 / 100
3 ms824 KiB
#include "encoder.h"
#include "encoderlib.h"
#include <bits/stdc++.h>

using namespace std;

void encode(int n, int a[]){
    for(int i = 0; i < n; i++){
        send((i | ((a[i] % 16) << 4)));
        send((i | ((a[i] % 16) << 4)));
        send((i | ((a[i] >> 4) << 4)));
    }
}
#include "decoder.h"
#include "decoderlib.h"
#include <bits/stdc++.h>

using namespace std;

void decode(int m, int n, int a[]){
    vector < int > pos[m];
    for(int i = 0; i < n; i++) pos[a[i] % 16].push_back((a[i] >> 4)); 
    for(int i = 0; i < m; i++){
        int x = 0;
        if(pos[i][0] == pos[i][1]){
            x = (pos[i][0] | (pos[i][2] << 4));
        }
        else if(pos[i][0] == pos[i][2]){
            x = (pos[i][0] | (pos[i][1] << 4));
        }
        else{
            x = (pos[i][1] | (pos[i][0] << 4));
        }
        output(x);
    }
}
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...