제출 #228030

#제출 시각아이디문제언어결과실행 시간메모리
228030muhammad_hokimiyonParrots (IOI11_parrots)C++14
17 / 100
21 ms2048 KiB
#include "encoder.h" #include "encoderlib.h" #include <bits/stdc++.h> #define fi first #define se second #define ll long long #define dl double long using namespace std; void encode(int n, int a[]) { for( int i = 0; i < n; i++ ){ for( int j = 0; j < 4; j++ ){ int x = i; for( int h = 6; h < 8; h++ ){ if( ( (a[i] >> (j * 2 + h - 6)) & 1) ){ x += (1 << h); } } for( int g = 0; g <= j; g++ ){ send( x ); } } } }
#include "decoder.h" #include "decoderlib.h" #include <bits/stdc++.h> #define fi first #define se second #define ll long long #define dl double long using namespace std; void decode(int n, int l, int a[]) { map < int , int > m; for( int i = 0; i < l; i++ ){ m[a[i]] += 1; } vector < int > ans(n , 0); for( auto x : m ){ int p = 0; for( int j = 0; j < 6; j++ ){ if( (x.fi & (1 << j)) )p |= (1 << j); } int val = 0; for( int j = 0; j < 2; j++ ){ if( (( x.fi >> (6 + j) ) & 1) ){ ans[p] |= (1 << ((x.se - 1) * 2 + j) ); } } } for( int i = 0; i < n; i++ ){ output( ans[i] ); } }

컴파일 시 표준 에러 (stderr) 메시지

decoder.cpp: In function 'void decode(int, int, int*)':
decoder.cpp:24:13: warning: unused variable 'val' [-Wunused-variable]
         int val = 0;
             ^~~
#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...