Submission #1006511

#TimeUsernameProblemLanguageResultExecution timeMemory
1006511christinelynnGame (IOI14_game)C++17
Compilation error
0 ms0 KiB
#include <bits/stdc++.h> using namespace std; #define int long long #define endl "\n" vector < int > freq; void initialize ( int n ){ freq.resize(n, 0); } bool hasEdge ( int u, int v ){ freq[u]++; freq[v]++; if ( max ( freq[u], freq[v]) == freq.size() - 1 ) return true; else return false; }

Compilation message (stderr)

game.cpp: In function 'bool hasEdge(long long int, long long int)':
game.cpp:16:34: warning: comparison of integer expressions of different signedness: 'const long long int' and 'std::vector<long long int>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
   16 |     if ( max ( freq[u], freq[v]) == freq.size() - 1 ) return true;
      |          ~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~
/usr/bin/ld: /tmp/cc5zM6hV.o: in function `main':
grader.cpp:(.text.startup+0x2a): undefined reference to `initialize(int)'
/usr/bin/ld: grader.cpp:(.text.startup+0x94): undefined reference to `hasEdge(int, int)'
collect2: error: ld returned 1 exit status