Submission #232054

#TimeUsernameProblemLanguageResultExecution timeMemory
232054BlerarghKing of Chairs (FXCUP4_chairs)C++17
Compilation error
0 ms0 KiB
#include "king.h" #include <vector> long long SendInfo(std::vector<int> W, std::vector<int> C) return 0;
#include <bits/stdc++.h> #include "vassal.h" using namespace std; typedef pair<int, int> ii; set<ii> chairs; void Init(long long B, vector<int> C){ int n = C.size(); for (int i=0; i<n; i++){ chairs.insert(make_pair(C[i],i)); } } int Maid(int w){ auto it = chairs.lower_bound(make_pair(w,0)); if (it == chairs.end()) return -1; else { int ans = (*it).second; chairs.erase(it); return ans; } }

Compilation message (stderr)

king.cpp: In function 'long long int SendInfo(std::vector<int>, std::vector<int>)':
king.cpp:3:67: error: expected identifier before numeric constant
 long long SendInfo(std::vector<int> W, std::vector<int> C) return 0;
                                                                   ^
king.cpp:3:60: error: named return values are no longer supported
 long long SendInfo(std::vector<int> W, std::vector<int> C) return 0;
                                                            ^~~~~~
king.cpp:3:68: error: expected '{' at end of input
 long long SendInfo(std::vector<int> W, std::vector<int> C) return 0;
                                                                    ^
king.cpp:3:68: warning: no return statement in function returning non-void [-Wreturn-type]