제출 #290600

#제출 시각아이디문제언어결과실행 시간메모리
290600georgerapeanu게임 (IOI14_game)C++11
42 / 100
1002 ms31224 KiB
#include "game.h" #pragma once #include <cstdio> #include <vector> #include <algorithm> #include <set> using namespace std; vector<int> active; vector<int> gr; set<pair<int,int> > edges; int gl_n; void initialize(int n) { gl_n = n; active = vector<int>(n,0); gr = vector<int>(n,1); active[0] = 1; gr[0] = 0; } int hasEdge(int u, int v) { edges.insert({u,v}); if(active[v] == 1){ swap(u,v); } if(active[u] == 0){ return false; } if(active[v] == 1){ return false; } if(gr[v] > 1){ gr[v]--; return false; } active[v] = true; for(int i = 0;i < gl_n;i++){ if(active[i] == 0 && edges.count({v,i}) == 0 && edges.count({i,v}) == 0){ gr[i]++; } } return true; }

컴파일 시 표준 에러 (stderr) 메시지

game.cpp:2:9: warning: #pragma once in main file
    2 | #pragma once
      |         ^~~~
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...