Submission #1005626

#TimeUsernameProblemLanguageResultExecution timeMemory
1005626spensaGame (IOI14_game)C++14
0 / 100
1 ms348 KiB
#include "game.h" #include <bits/stdc++.h> using namespace std; // #include <vector> int N; void initialize(int n) { N = n; } const int MXN = 1500 + 20; int par[MXN] = {0}; // int notpar[MXN]; // vector<vector<int>> notpar(MXN); set<int> notpar[MXN]; int hasEdge(int u, int v) { if(u>v){ int tmp = u; u = v; v = tmp; //swap(u, v); } if((notpar[v].size())==(v-2)){ par[v] = u; return 1; } notpar[v].insert(u); return 0; }

Compilation message (stderr)

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