Submission #1064454

#TimeUsernameProblemLanguageResultExecution timeMemory
1064454sunboiGame (IOI14_game)C++17
0 / 100
1 ms348 KiB
#include <bits/stdc++.h> using namespace std; #include "game.h" set<int> val; int s = 0; void initialize(int n){ s = n; } int hasEdge(int u, int v){ if (val.size() == s - 1){ if (val.count(u) && val.count(v)) return 1; else return 0; }else if (val.size() == s - 2){ if (!val.count(u) && !val.count(v)) return 0; else return 1; }else return 1; }

Compilation message (stderr)

game.cpp: In function 'int hasEdge(int, int)':
game.cpp:17:20: warning: comparison of integer expressions of different signedness: 'std::set<int>::size_type' {aka 'long unsigned int'} and 'int' [-Wsign-compare]
   17 |     if (val.size() == s - 1){
      |         ~~~~~~~~~~~^~~~~~~~
game.cpp:20:26: warning: comparison of integer expressions of different signedness: 'std::set<int>::size_type' {aka 'long unsigned int'} and 'int' [-Wsign-compare]
   20 |     }else if (val.size() == s - 2){
      |               ~~~~~~~~~~~^~~~~~~~
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...