제출 #1064454

#제출 시각아이디문제언어결과실행 시간메모리
1064454sunboi게임 (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; }

컴파일 시 표준 에러 (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...