Submission #208278

#TimeUsernameProblemLanguageResultExecution timeMemory
208278DodgeBallManMemory (IOI10_memory)C++14
Compilation error
0 ms0 KiB
#include <bits/stdc++.h> #include "grader.h" #include "memory.h" using namespace std; vector<int> pos[30]; void play{ for( int i = 1 ; i <= 25 ; i++ ) { pos[faceup( 2*i )-'A'].emplace_back( 2*i ); pos[faceup( 2*i - 1 )-'A'].emplace_back( 2*i - 1 ); } for( int i = 0 ; i < 25 ; i++ ) faceup( pos[i][0] ), faceup( pos[i][1] ); }

Compilation message (stderr)

memory.cpp:9:6: error: variable or field 'play' declared void
 void play{
      ^~~~
memory.cpp:10:5: error: expected primary-expression before 'for'
     for( int i = 1 ; i <= 25 ; i++ ) {
     ^~~
memory.cpp:10:5: error: expected '}' before 'for'
memory.cpp:10:22: error: 'i' does not name a type
     for( int i = 1 ; i <= 25 ; i++ ) {
                      ^
memory.cpp:10:32: error: 'i' does not name a type
     for( int i = 1 ; i <= 25 ; i++ ) {
                                ^
memory.cpp:14:5: error: expected unqualified-id before 'for'
     for( int i = 0 ; i < 25 ; i++ ) faceup( pos[i][0] ), faceup( pos[i][1] );
     ^~~
memory.cpp:14:22: error: 'i' does not name a type
     for( int i = 0 ; i < 25 ; i++ ) faceup( pos[i][0] ), faceup( pos[i][1] );
                      ^
memory.cpp:14:31: error: 'i' does not name a type
     for( int i = 0 ; i < 25 ; i++ ) faceup( pos[i][0] ), faceup( pos[i][1] );
                               ^
memory.cpp:15:1: error: expected declaration before '}' token
 }
 ^