Submission #1140449

#TimeUsernameProblemLanguageResultExecution timeMemory
1140449aarb_.tomatexdParrots (IOI11_parrots)C++20
Compilation error
0 ms0 KiB
//#include "parrots.h"
#include <bits/stdc++.h>
using namespace std;

#define ll long long

void encode(int N, int M[]) {
    for( int i = 0; i < N; i++ ) for( int j = 0; j < 9; j++ ) if( M[i] & ( 1 << j ) )  send( j + 8 * i );
}

void decode(int N, int L, int X[]) {
	vector<int>ans(102,0);
	for( int i = 0; i < L; i++ ){ 
	        int x, y;
        	x = X[i] / 8;
        	y = X[i] % 8;
        	ans[x] |= (1 << y);
	}
	for( int i = 0; i < N; i++ ) output( ans[i] );
}
//#include "parrots.h"
#include <bits/stdc++.h>
using namespace std;

#define ll long long

void encode(int N, int M[]) {
    for( int i = 0; i < N; i++ ) for( int j = 0; j < 9; j++ ) if( M[i] & ( 1 << j ) )  send( j + 8 * i );
}

void decode(int N, int L, int X[]) {
	vector<int>ans(102,0);
	for( int i = 0; i < L; i++ ){ 
	        int x, y;
        	x = X[i] / 8;
        	y = X[i] % 8;
        	ans[x] |= (1 << y);
	}
	for( int i = 0; i < N; i++ ) output( ans[i] );
}

Compilation message (stderr)

# 1번째 컴파일 단계

encoder.cpp: In function 'void encode(int, int*)':
encoder.cpp:8:88: error: 'send' was not declared in this scope
    8 |     for( int i = 0; i < N; i++ ) for( int j = 0; j < 9; j++ ) if( M[i] & ( 1 << j ) )  send( j + 8 * i );
      |                                                                                        ^~~~
encoder.cpp: In function 'void decode(int, int, int*)':
encoder.cpp:19:38: error: 'output' was not declared in this scope
   19 |         for( int i = 0; i < N; i++ ) output( ans[i] );
      |                                      ^~~~~~