Submission #290598

#TimeUsernameProblemLanguageResultExecution timeMemory
290598georgerapeanuGame (IOI14_game)C++11
0 / 100
1 ms256 KiB
#include "game.h" #pragma once #include<vector> #include<algorithm> using namespace std; vector<int> active; vector<int> gr; void initialize(int n) { active = vector<int>(n,0); gr = vector<int>(n,1); active[0] = 1; gr[0] = 0; } int hasEdge(int u, int 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(auto &it:gr){ it++; } return true; }

Compilation message (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...