제출 #14824

#제출 시각아이디문제언어결과실행 시간메모리
14824minsu앵무새 (IOI11_parrots)C++14
컴파일 에러
0 ms0 KiB
#include <bits/stdc++.h> using namespace std; void encode(int N, int M[]) { for(int i=0; i<N; i++){ int a = M[i] / 100; int b = M[i] / 10 % 10; int c = M[i] % 10; while( a!=0 || b!=0 || c!=0 ){ int s = i<<3; if(a) s |= 4, a--; if(b) s |= 2, b--; if(c) s |= 1, c--; send( s ); } } send( (N-1)<<3 ); }
#include <bits/stdc++.h> using namespace std; void decode(int N, int L, int X[]) { int i, b, n=0; vector<int> m(111); for(i=0; i<L; i++) { m[ X[i]>>3 ] += X[i]%8; n = max( n, X[i]>>3 ); } for(i=0; i<=n; i++) output( m[i] ); }

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

encoder.cpp: In function 'void encode(int, int*)':
encoder.cpp:15:7: error: 'send' was not declared in this scope
       send( s );
       ^~~~
encoder.cpp:15:7: note: suggested alternative: 'setns'
       send( s );
       ^~~~
       setns
encoder.cpp:18:3: error: 'send' was not declared in this scope
   send( (N-1)<<3 );
   ^~~~
encoder.cpp:18:3: note: suggested alternative: 'setns'
   send( (N-1)<<3 );
   ^~~~
   setns

decoder.cpp: In function 'void decode(int, int, int*)':
decoder.cpp:13:5: error: 'output' was not declared in this scope
     output( m[i] );
     ^~~~~~
decoder.cpp:13:5: note: suggested alternative: 'getpt'
     output( m[i] );
     ^~~~~~
     getpt
decoder.cpp:6:10: warning: unused variable 'b' [-Wunused-variable]
   int i, b, n=0;
          ^