Submission #1043570

#TimeUsernameProblemLanguageResultExecution timeMemory
1043570deeraGame (IOI14_game)C++14
100 / 100
880 ms71372 KiB
#include "game.h" #include <bits/stdc++.h> using namespace std; vector<set<int>> asked; void initialize(int n) { vector<set<int>> v(n, set<int>()); asked = v; } int hasEdge(int u, int v) { if (u > v) swap(u, v); asked[v].insert(u); return asked[v].size() == v; }

Compilation message (stderr)

game.cpp: In function 'int hasEdge(int, int)':
game.cpp:16:28: warning: comparison of integer expressions of different signedness: 'std::set<int>::size_type' {aka 'long unsigned int'} and 'int' [-Wsign-compare]
   16 |     return asked[v].size() == v;
      |            ~~~~~~~~~~~~~~~~^~~~
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...