Submission #30423

#TimeUsernameProblemLanguageResultExecution timeMemory
30423kavunGame (IOI14_game)C++14
0 / 100
0 ms10872 KiB
#include "game.h" #include <bits/stdc++.h> using namespace std; int cc[2000], cccnt[2000], N, cnt; vector <int> ccver[2000]; void initialize(int n) { N = n; } int hasEdge(int u, int v) { if(cc[u] == cc[v]) return 1; if(cccnt[u] == N-1) { for(int i = 0; i < ccver[cc[u]].size(); i++) ccver[cc[v]].push_back(ccver[cc[u]][i]), cc[ccver[cc[u]][i]] = cc[v]; return 1; } if(cccnt[v] == N-1) { for(int i = 0; i < ccver[cc[v]].size(); i++) ccver[cc[u]].push_back(ccver[cc[v]][i]), cc[ccver[cc[v]][i]] = cc[u]; return 1; } else { cccnt[u]++; cccnt[v]++; return 0; } }

Compilation message (stderr)

game.cpp: In function 'int hasEdge(int, int)':
game.cpp:17:24: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
       for(int i = 0; i < ccver[cc[u]].size(); i++)
                        ^
game.cpp:23:24: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
       for(int i = 0; i < ccver[cc[v]].size(); i++)
                        ^
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...