Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit dccfe3b

Browse files
committed
Update
1 parent 748b050 commit dccfe3b

5 files changed

Lines changed: 22 additions & 3 deletions

File tree

‎kattis/Forest for the trees/forest.vn.py‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# Forest for the trees
22
# https://open.kattis.com/problems/forestforthetrees
33
# Number-theory
4-
# 21/01/2025
4+
# 21/01/2026
55

66

77
from math import gcd
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
g=[0]*9
2+
for _ in range(int(input())):
3+
i=0;w={"X":0,"O":0}
4+
for _ in range(3):
5+
for c in input():g[i]=c;i+=1
6+
try:input()
7+
except:0
8+
for i,j,k in[(0,1,2),(3,4,5),(6,7,8),(0,3,6),(1,4,7),(2,5,8),(0,4,8),(2,4,6)]:
9+
if g[i]==g[j]==g[k]and g[i]in"XO":w[g[i]]=1
10+
print("yes"if(d:=g.count("X")-g.count("O"))in(0,1)and not(w["X"]and w["O"])and((not w["X"]and d==0)or(not w["O"]and d==1))else"no")

‎kattis/TicTacToe2/tictactoe2.vn.py‎

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
# TicTacToe2
2+
# https://open.kattis.com/problems/tictactoe2
3+
# Game solving
4+
# 31/01/2026
15

26
grid = ["" for _ in range(9)]
37

@@ -34,7 +38,7 @@
3438
}
3539

3640
for i, j, k in lines:
37-
if grid[i]==grid[j]==grid[k] and grid[i] in "X0":
41+
if grid[i]==grid[j]==grid[k] and grid[i] in "XO":
3842
wins[grid[i]] = True
3943

4044
# X wins

‎kattis/Two Stones/2stones.vn.py‎

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,6 @@
1+
# Take Two Stones
2+
# https://open.kattis.com/problems/twostones
3+
# Game solving
4+
# 21/01/2026
5+
16
print("Alice" if int(input())%2 else "Bob")

‎kattis/Where is my internet/internet.vn.py‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# Where is my internet
22
# https://open.kattis.com/problems/wheresmyinternet
33
# Union-find
4-
# 21/01/2025
4+
# 21/01/2026
55

66
n, m = map(int, input().split())
77

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /