結果

問題 No.627 ランダムウォークの軌跡
ユーザー かぼちゃ
提出日時 2018-03-03 21:33:14
言語 C++11(廃止可能性あり)
(gcc 13.3.0)
結果
AC  
実行時間 2 ms / 2,000 ms
コード長 348 bytes
コンパイル時間 455 ms
コンパイル使用メモリ 55,896 KB
実行使用メモリ 5,376 KB
最終ジャッジ日時 2024-07-04 15:41:10
合計ジャッジ時間 1,272 ms
ジャッジサーバーID
(参考情報)
judge1 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 33
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <iostream>
#include <string>
#include <vector>
using namespace std;

int main() {
    int t;
    cin >> t;
    int x1 = 0;
    int x2;
    bool ans = true;
    for(int i = 0;i < t;i++){
        cin >> x2;
        if(x1+1 != x2 && x1-1 != x2)ans = false;
        x1 = x2;
    }
    if(ans)cout << 'T';
    else cout << 'F';
    return 0;
}
0