Submission #147390

#TimeUsernameProblemLanguageResultExecution timeMemory
147390mosiashvililukaArranging Shoes (IOI19_shoes)C++14
Compilation error
0 ms0 KiB
#include<bits/stdc++.h>
using namespace std;
long long a,b,c,d,e,f[200009];
long long count_swaps(int[] S){
	for(a=1; ; a++) if(S[a-1]==0) break;
	for(b=1; b<=a; b++) f[b]=S[b-1];
	if(f[1]<0) return 0LL; else return 1LL;
}

Compilation message (stderr)

shoes.cpp:4:29: error: expected ',' or '...' before 'S'
 long long count_swaps(int[] S){
                             ^
shoes.cpp: In function 'long long int count_swaps(int*)':
shoes.cpp:5:21: error: 'S' was not declared in this scope
  for(a=1; ; a++) if(S[a-1]==0) break;
                     ^
shoes.cpp:6:27: error: 'S' was not declared in this scope
  for(b=1; b<=a; b++) f[b]=S[b-1];
                           ^