제출 #567809

#제출 시각아이디문제언어결과실행 시간메모리
567809Halym2007Arranging Shoes (IOI19_shoes)C++17
컴파일 에러
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;

컴파일 시 표준 에러 (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) {
      |                                ^