From 352ec6ef048214196a519ed1a91aa65919fe9075 Mon Sep 17 00:00:00 2001 From: oncsr Date: Wed, 15 Oct 2025 12:42:26 +0900 Subject: [PATCH] =?UTF-8?q?[20251015]=20BOJ=20/=20P3=20/=20Game=20on=20Pla?= =?UTF-8?q?ne=20/=20=EA=B6=8C=ED=98=81=EC=A4=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- khj20006/202510/15 BOJ P3 Game on Plane.md | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 khj20006/202510/15 BOJ P3 Game on Plane.md diff --git a/khj20006/202510/15 BOJ P3 Game on Plane.md b/khj20006/202510/15 BOJ P3 Game on Plane.md new file mode 100644 index 00000000..75cbc092 --- /dev/null +++ b/khj20006/202510/15 BOJ P3 Game on Plane.md @@ -0,0 +1,19 @@ +```cpp +#include +using namespace std; + +int T, N, a, d[5001]{}; + +int main(){ + cin.tie(0)->sync_with_stdio(0); + + for(int i=2;i<=5000;i++) { + bitset<5000> v; + for(int j=0;j<=i-j-2;j++) v[d[j]^d[i-j-2]]=1; + while(v[d[i]]) d[i]++; + } + + for(cin>>T;T--;cout<<(d[a] ? "First\n" : "Second\n")) cin>>a; + +} +```