結果
| 問題 | No.627 ランダムウォークの軌跡 | 
| コンテスト | |
| ユーザー |  minezumu | 
| 提出日時 | 2018-07-08 23:00:41 | 
| 言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) | 
| 結果 | 
                                AC
                                 
                             | 
| 実行時間 | 30 ms / 2,000 ms | 
| コード長 | 344 bytes | 
| コンパイル時間 | 294 ms | 
| コンパイル使用メモリ | 12,672 KB | 
| 実行使用メモリ | 10,880 KB | 
| 最終ジャッジ日時 | 2024-07-08 00:38:43 | 
| 合計ジャッジ時間 | 2,045 ms | 
| ジャッジサーバーID (参考情報) | judge5 / judge4 | 
(要ログイン)
| ファイルパターン | 結果 | 
|---|---|
| other | AC * 33 | 
ソースコード
T = int(input())
X = []
for i in range(0,T) :
    x = int(input())
    X.append(x)
counter = 0
for j in range(0,T-1) :
    if (X[j] - X[j+1] == 1) or (X[j] - X[j+1] == -1) :
        if (X[0] == 1) or (X[0] == -1) :
            counter += 1
if (int(counter) ==  T-1) and ((X[0] == 1) or (X[0] == -1)) :
    print("T")
else :
    print("F")
    
            
            
            
        