Submission #1006461

#TimeUsernameProblemLanguageResultExecution timeMemory
1006461christinelynnGame (IOI14_game)C++17
Compilation error
0 ms0 KiB
#include <bits/stdc++.h> // using namespace std; # define int long long # define fir first # define sec second # define pb push_back # define endl "\n" const int cnst = 2e5+5; bool mutipletestcase = 0; bool debug = false; int freq[1501]; void initialize(int n) {} bool hasEdge(int u, int v) { freq[max(u, v)]++; return freq[max(u, v)] == max(u, v); } // signed main() { // ios_base::sync_with_stdio(false); cin.tie(0); // int t = 1; // if(mutipletestcase) cin >> t; // while(t--) solve(); // }

Compilation message (stderr)

game.cpp: In function 'bool hasEdge(long long int, long long int)':
game.cpp:19:10: error: 'max' was not declared in this scope; did you mean 'std::max'?
   19 |     freq[max(u, v)]++;
      |          ^~~
      |          std::max
In file included from /usr/include/c++/10/algorithm:62,
                 from /usr/include/x86_64-linux-gnu/c++/10/bits/stdc++.h:65,
                 from game.cpp:1:
/usr/include/c++/10/bits/stl_algo.h:3486:5: note: 'std::max' declared here
 3486 |     max(initializer_list<_Tp> __l, _Compare __comp)
      |     ^~~