Submission #1017776

#TimeUsernameProblemLanguageResultExecution timeMemory
1017776MohamedFaresNebiliMagic Show (APIO24_show)C++17
5 / 100
3 ms832 KiB
#include <bits/stdc++.h> #include "Alice.h" using namespace std; vector<pair<int, int>> Alice() { long long X = setN(5000); vector<pair<int, int>> G; for(int l = 1; l <= 5000; l++) { if(l == X) continue; G.push_back({X, l}); } return G; }
#include <bits/stdc++.h> #include "Bob.h" using namespace std; long long Bob(vector<pair<int, int>> V) { vector<int> occ(5001, 0); for(int l = 0; l < V.size(); l++) { int X = V[l].first, Y = V[l].second; occ[X]++, occ[Y]++; if(occ[X] > occ[Y]) swap(X, Y); if(occ[Y] > 1) return Y; } return -1; }

Compilation message (stderr)

Bob.cpp: In function 'long long int Bob(std::vector<std::pair<int, int> >)':
Bob.cpp:8:21: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<std::pair<int, int> >::size_type' {aka 'long unsigned int'} [-Wsign-compare]
    8 |    for(int l = 0; l < V.size(); l++) {
      |                   ~~^~~~~~~~~~
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...