結果
| 問題 | 
                            No.1801 Segment Game
                             | 
                    
| コンテスト | |
| ユーザー | 
                             | 
                    
| 提出日時 | 2022-03-31 15:34:47 | 
| 言語 | Python3  (3.13.1 + numpy 2.2.1 + scipy 1.14.1)  | 
                    
| 結果 | 
                             
                                AC
                                 
                             
                            
                         | 
                    
| 実行時間 | 561 ms / 2,000 ms | 
| コード長 | 564 bytes | 
| コンパイル時間 | 229 ms | 
| コンパイル使用メモリ | 12,416 KB | 
| 実行使用メモリ | 30,336 KB | 
| 最終ジャッジ日時 | 2024-11-17 02:12:15 | 
| 合計ジャッジ時間 | 7,061 ms | 
| 
                            ジャッジサーバーID (参考情報)  | 
                        judge5 / judge3 | 
(要ログイン)
| ファイルパターン | 結果 | 
|---|---|
| sample | AC * 1 | 
| other | AC * 10 | 
ソースコード
t=int(input())
hwd=[]
for _ in range(t):
    h,w,d=map(int,input().split())
    hwd.append([h,w,d])
# 対称攻めが可能な方が勝ち
# 先手が長方形の中心を通る線分を引けるか? 引けるなら先手勝ちで、それ以外は後手勝ち
# 長方形の周上から周上へ延びる線分で中心を通るものの内、最も短い線分がD以下なら先手勝ち
for h,w,d in hwd:
    tate=h**2 if w%2==0 else h**2+1
    yoko=w**2 if h%2==0 else w**2+1
    if min(tate,yoko)<=d**2:
        print("N")
    else:
        print("S")