Submission #117284

# Submission time Handle Problem Language Result Execution time Memory
117284 2019-06-15T12:43:30 Z nvmdava Parrots (IOI11_parrots) C++17
0 / 100
9 ms 1608 KB
#include "encoder.h"
#include "encoderlib.h"

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

int a[65];

void decode(int N, int L, int X[])
{
  multiset<int> in;
  int i;
  for(i=0; i<L; i++){
    in.insert(X[i]);
    //output(b);
  }
   while(!in.empty()){
      for(int x : in){
         bool ok = 0;
         for(int i = 0; i < N; i++){
            if(!in.count(x ^ i)) continue;
            ok = 1;
            a[i] = x;
            in.erase(in.find(x));
            in.erase(in.find(x ^ i));
         }
         if(ok) break;
      }
   }
   for(int i = 0; i < N; i++){
      output(a[i]);
   }
}
# Verdict Execution time Memory Grader output
1 Runtime error 7 ms 1184 KB Execution killed with signal 11 (could be triggered by violating memory limits)
# Verdict Execution time Memory Grader output
1 Runtime error 7 ms 1536 KB Execution killed with signal 11 (could be triggered by violating memory limits)
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Runtime error 6 ms 1536 KB Execution killed with signal 11 (could be triggered by violating memory limits)
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Runtime error 6 ms 1536 KB Execution killed with signal 11 (could be triggered by violating memory limits)
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Runtime error 7 ms 1536 KB Execution killed with signal 11 (could be triggered by violating memory limits)
2 Runtime error 7 ms 1536 KB Execution killed with signal 11 (could be triggered by violating memory limits)
3 Runtime error 8 ms 1560 KB Execution killed with signal 11 (could be triggered by violating memory limits)
4 Runtime error 8 ms 1568 KB Execution killed with signal 11 (could be triggered by violating memory limits)
5 Runtime error 9 ms 1536 KB Execution killed with signal 11 (could be triggered by violating memory limits)
6 Runtime error 7 ms 1608 KB Execution killed with signal 11 (could be triggered by violating memory limits)
7 Runtime error 8 ms 1576 KB Execution killed with signal 11 (could be triggered by violating memory limits)