Submission #952656

# Submission time Handle Problem Language Result Execution time Memory
952656 2024-03-24T12:55:27 Z batsukh2006 Arranging Shoes (IOI19_shoes) C++17
Compilation error
0 ms 0 KB
#include<iostream>
#include<stdio.h>
#include<math.h>
#include<map>
#include<string>
#include<algorithm>
#include<vector>
#include<string.h>
#include<utility>
#include<set>
#include<cmath>
#include<queue>
#include<deque>
#include<functional>
#include<stack>
#include<limits.h>
#include<iomanip>
#include<unordered_map> 

#include "shoes.h"
 
using namespace std;
 
#define MOD 1000000007
#define int long long
#define endl '\n'
int count_swaps(int[] a){
    if(a[0]<0) return 0;
    else return 1;
}
// signed main(){
// 	// freopen("hps.in", "r", stdin);
// 	// freopen("hps.out", "w", stdout);
// 	ios::sync_with_stdio(0);
// 	cin.tie(0);
// 	cout.tie(0);
	
// 	int t=1;
// 	// cin>>t;
// 	while(t--){
// 		solve();
// 		cout<<endl;
// 	}
// 	return 0;
// }

Compilation message

shoes.cpp:27:23: error: expected ',' or '...' before 'a'
   27 | int count_swaps(int[] a){
      |                       ^
shoes.cpp: In function 'long long int count_swaps(long long int*)':
shoes.cpp:28:8: error: 'a' was not declared in this scope
   28 |     if(a[0]<0) return 0;
      |        ^
shoes.cpp:30:1: warning: control reaches end of non-void function [-Wreturn-type]
   30 | }
      | ^