Submission #711395

#TimeUsernameProblemLanguageResultExecution timeMemory
711395mseebacherParrots (IOI11_parrots)C++17
Compilation error
0 ms0 KiB
#include <bits/stdc++.h> #include "encoder.h" #include "encoderlib.h" using namespace std; void encode(int x, int m[]){ for(int i = 0;i<x;i++){ for(int j = 0;j<8;j++){ if((1 << j) & m[i]) send(j+8*i); } } }
#include <bits/stdc++.h> #include "decoder.h" #include "decoderlib.h" using namespace std; void decode(int x,int l,int m[]){ vector<int> ans(l,0); for(int i = 0;i<l;i++){ int zahl = m[i]/8; int bit = m[i] % 8; ans[zahl] |= (1 << bit); } } for(int i = 0;i<x;i++){ output(ans[i]); } }

Compilation message (stderr)

decoder.cpp:14:2: error: expected unqualified-id before 'for'
   14 |  for(int i = 0;i<x;i++){
      |  ^~~
decoder.cpp:14:16: error: 'i' does not name a type
   14 |  for(int i = 0;i<x;i++){
      |                ^
decoder.cpp:14:20: error: 'i' does not name a type
   14 |  for(int i = 0;i<x;i++){
      |                    ^
decoder.cpp:17:1: error: expected declaration before '}' token
   17 | }
      | ^