Submission #1173487

#TimeUsernameProblemLanguageResultExecution timeMemory
1173487CiprianArranging Shoes (IOI19_shoes)C++20
Compilation error
0 ms0 KiB

#include <bits/stdc++.h>
using namespace std;
#define int long long 
int count_swaps(int[] S){
    if(sizeof(S)==2){
        if(S[0]<0)return 0;
        else return 1;
    }
}

Compilation message (stderr)

shoes.cpp:5:23: error: expected ',' or '...' before 'S'
    5 | int count_swaps(int[] S){
      |                       ^
shoes.cpp: In function 'long long int count_swaps(long long int*)':
shoes.cpp:6:15: error: 'S' was not declared in this scope
    6 |     if(sizeof(S)==2){
      |               ^
shoes.cpp:10:1: warning: control reaches end of non-void function [-Wreturn-type]
   10 | }
      | ^