Submission #309055

#TimeUTC-0UsernameProblemLanguageResultExecution timeMemory
3090552020-10-02 16:51:47VimmerCounting Mushrooms (IOI20_mushrooms)C++14
Compilation error
0 ms0 KiB
#include <bits/stdc++.h>
#include "mushrooms.h"
//#include <ext/pb_ds/assoc_container.hpp>
//#include <ext/pb_ds/tree_policy.hpp>
#define N 100005
#define PB push_back
#define sz(x) int(x.size())
#define F first
#define M ll(1e9 + 7)
#define S second
#define all(x) x.begin(), x.end()
#define endl '\n'
//#pragma GCC optimize("unroll-loops")
//#pragma GCC optimize("-O3")
//#pragma GCC optimize("Ofast")
//#pragma GCC optimize("fast-math")
//#pragma GCC optimize("no-stack-protector")
using namespace std;
//using namespace __gnu_pbds;
typedef long long ll;
//typedef tree <int, null_type, less_equal <int>, rb_tree_tag, tree_order_statistics_node_update> ordered_set;
int val[N], kol, sum = 0;
int use_machine(vector <int> &pr)
{
 
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

Compilation message (stderr)

mushrooms.cpp: In function 'int ask(std::vector<int>&)':
mushrooms.cpp:45:48: error: call of overloaded 'use_machine(std::vector<int>&)' is ambiguous
   45 | int ask(vector <int> &m) { return use_machine(m);}
      |                                                ^
In file included from mushrooms.cpp:2:
mushrooms.h:5:5: note: candidate: 'int use_machine(std::vector<int>)'
    5 | int use_machine(std::vector<int> x);
      |     ^~~~~~~~~~~
mushrooms.cpp:29:5: note: candidate: 'int use_machine(std::vector<int>&)'
   29 | int use_machine(vector <int> &pr)
      |     ^~~~~~~~~~~
mushrooms.cpp: In function 'int ask(std::set<int>&)':
mushrooms.cpp:46:101: error: call of overloaded 'use_machine(std::vector<int>&)' is ambiguous
   46 | int ask(set <int> &se) {vector <int> m; m.clear(); for (auto it : se) m.PB(it); return use_machine(m);}
      |                                                                                                     ^
In file included from mushrooms.cpp:2:
mushrooms.h:5:5: note: candidate: 'int use_machine(std::vector<int>)'
    5 | int use_machine(std::vector<int> x);
      |     ^~~~~~~~~~~
mushrooms.cpp:29:5: note: candidate: 'int use_machine(std::vector<int>&)'
   29 | int use_machine(vector <int> &pr)
      |     ^~~~~~~~~~~