結果
| 問題 | No.361 門松ゲーム2 |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2025-06-07 14:38:45 |
| 言語 | PyPy3 (7.3.17) |
| 結果 |
TLE
|
| 実行時間 | - |
| コード長 | 423 bytes |
| 記録 | |
| コンパイル時間 | 240 ms |
| コンパイル使用メモリ | 95,852 KB |
| 実行使用メモリ | 87,552 KB |
| 最終ジャッジ日時 | 2026-07-11 06:42:28 |
| 合計ジャッジ時間 | 9,632 ms |
|
ジャッジサーバーID (参考情報) |
judge2_0 / judge3_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 22 TLE * 1 -- * 5 |
ソースコード
L, d = map(int, input().split())
from functools import *
@cache
def f(L):
T = set()
for i in range(1, L):
for j in range(i+1, L):
S = {i, j-i, L-j}
if len(S)==3 and max(S)-min(S)<=d:
# print(S)
cnt = 0
for s in S:
cnt ^= f(s)
T.add(cnt)
cnt = 0
while cnt in T:
cnt += 1
# print(L, cnt)
return cnt
if f(L):
print('kado')
else:
print('matsu')