Submission #18354

# Submission time Handle Problem Language Result Execution time Memory
18354 2016-01-28T05:20:59 Z suhgyuho_william Parrots (IOI11_parrots) C++14
0 / 100
6 ms 2024 KB
#include "encoder.h"
#include "encoderlib.h"

void encode(int N, int M[])
{
  int i,t;
  t = 0;
  for(i=0; i<N; i++) send(M[i]);
}
#include "decoder.h"
#include "decoderlib.h"
#include <algorithm>
using namespace std;

int cnt;

void decode(int N, int L, int X[]){
	int i;

	cnt++;
	if(cnt == 1){
		for(i=0; i<N; i++){
			output(X[i]);
		}
		return;
	}
	i = 0;
	while(i < L-1){
		swap(X[i],X[i+1]);
		i += 2;
	}
	for(i=0; i<N; i++) output(X[i]);
}

Compilation message

encoder.cpp: In function 'void encode(int, int*)':
encoder.cpp:6:9: warning: variable 't' set but not used [-Wunused-but-set-variable]
   int i,t;
         ^
# Verdict Execution time Memory Grader output
1 Incorrect 4 ms 752 KB Error : Output is wrong
# Verdict Execution time Memory Grader output
1 Incorrect 4 ms 1592 KB Error : Output is wrong
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 4 ms 1720 KB Error : Output is wrong
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 4 ms 1784 KB Error : Output is wrong
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 5 ms 1912 KB Error : Output is wrong
2 Incorrect 5 ms 1912 KB Error : Output is wrong
3 Incorrect 5 ms 1944 KB Error : Output is wrong
4 Incorrect 5 ms 1976 KB Error : Output is wrong
5 Incorrect 5 ms 2024 KB Error : Output is wrong
6 Incorrect 6 ms 2024 KB Error : Output is wrong
7 Incorrect 5 ms 2024 KB Error : Output is wrong