Submission #1289187

#TimeUsernameProblemLanguageResultExecution timeMemory
1289187muhammad-mutahirGame (IOI14_game)C++20
Compilation error
0 ms0 KiB
#include <bits/stdc++.h> using namespace std; #include "game.h" void initialize(int ki){ int n = ki; map<int,int>cnt; } int hasEdge(int u,int v){ if(u>v)swap(u,v); cnt[u]++; cnt[v]++; // int path = findcnt(u,v); if(cnt[u] == n-1 or cnt[v] == n-1){ return 1; } else{ return 0; } }

Compilation message (stderr)

game.cpp: In function 'int hasEdge(int, int)':
game.cpp:12:9: error: 'cnt' was not declared in this scope; did you mean 'int'?
   12 |         cnt[u]++;
      |         ^~~
      |         int
game.cpp:16:22: error: 'n' was not declared in this scope
   16 |         if(cnt[u] == n-1 or cnt[v] == n-1){
      |                      ^
game.cpp:23:1: warning: control reaches end of non-void function [-Wreturn-type]
   23 | }
      | ^