Submission #149453

#TimeUsernameProblemLanguageResultExecution timeMemory
14945320190901 (#200)Bulb Game (FXCUP4_bulb)C++17
Compilation error
0 ms0 KiB
#include "grid.h" #include <iostream> #define swap(a, b) (a^=b^=a^=b) std::vector<int> solve(std::vector<int> &a) { std::vector<int> ans(a.size()); for(int i=0; i<ans.size(); i++) { ans[a[i]]=i+1; } return ans; } std::vector<int> SortDisks(int N) { std::vector<int> res(N), a(N, -1); for(int i=0; i<N; i++) res[i]=i; for(int i=N-1; i>=0; i--) { for(int j=1; j<=i; j++) { int t=PutDisks(res); if(t==N) return solve(res); if(t-N==i) { a[res[0]]=i; swap(res[0], res[i]); break; } swap(res[0], res[j]); } } return solve(res); }

Compilation message (stderr)

bulb.cpp:1:10: fatal error: grid.h: No such file or directory
 #include "grid.h"
          ^~~~~~~~
compilation terminated.