Submission #1273910

#TimeUsernameProblemLanguageResultExecution timeMemory
1273910almazArranging Shoes (IOI19_shoes)C++20
Compilation error
0 ms0 KiB
#include "shoes.h"
#include <bits/stdc++.h>
using namespace std;

// #define int long long
// #define endl '\n'
#define ff first
#define ss second
#define pb push_back
#define all(a) a.begin(), a.end()
#define rall(a) a.rbegin(), a.rend()
#define ar array

const int MOD = 1e9 + 7,INF = 1e9, N = 2e5 + 5;

long long count_swaps(std::vector<int> s) {
	int n = s.size() / 2;
	if(n % 2 == 0 || n == 1){
		return n - 1;
	}
	else{
		return n;
}

Compilation message (stderr)

shoes.cpp: In function 'long long int count_swaps(std::vector<int>)':
shoes.cpp:23:2: error: expected '}' at end of input
   23 | }
      |  ^
shoes.cpp:16:43: note: to match this '{'
   16 | long long count_swaps(std::vector<int> s) {
      |                                           ^