Submission #567809

#TimeUsernameProblemLanguageResultExecution timeMemory
567809Halym2007Arranging Shoes (IOI19_shoes)C++17
Compilation error
0 ms0 KiB
#include <bits/stdc++.h> using namespace std; typedef long long ll; ll count_swaps(vector <int> S) { long long int n = S.size(); if (n == 1) { if (S[0] < 0 and S[1] > 0) { return 0; } else return 1; } else { long long int ans = (n / 2) * (n / 2 - 1) / 2; return ans;

Compilation message (stderr)

shoes.cpp: In function 'll count_swaps(std::vector<int>)':
shoes.cpp:14:11: error: expected '}' at end of input
   14 | return ans;
      |           ^
shoes.cpp:12:6: note: to match this '{'
   12 | else {
      |      ^
shoes.cpp:14:11: error: expected '}' at end of input
   14 | return ans;
      |           ^
shoes.cpp:4:32: note: to match this '{'
    4 | ll count_swaps(vector <int> S) {
      |                                ^