Skip to content

Commit 352ec6e

Browse files
authored
[20251015] BOJ / P3 / Game on Plane / 권혁준
1 parent 17f9ae8 commit 352ec6e

File tree

1 file changed

+19
-0
lines changed

1 file changed

+19
-0
lines changed
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
```cpp
2+
#include <bits/stdc++.h>
3+
using namespace std;
4+
5+
int T, N, a, d[5001]{};
6+
7+
int main(){
8+
cin.tie(0)->sync_with_stdio(0);
9+
10+
for(int i=2;i<=5000;i++) {
11+
bitset<5000> v;
12+
for(int j=0;j<=i-j-2;j++) v[d[j]^d[i-j-2]]=1;
13+
while(v[d[i]]) d[i]++;
14+
}
15+
16+
for(cin>>T;T--;cout<<(d[a] ? "First\n" : "Second\n")) cin>>a;
17+
18+
}
19+
```

0 commit comments

Comments
 (0)