結果

問題 No.627 ランダムウォークの軌跡
ユーザー mas9612
提出日時 2019-08-03 19:05:38
言語 C++11(廃止可能性あり)
(gcc 13.3.0)
結果
AC  
実行時間 2 ms / 2,000 ms
コード長 431 bytes
コンパイル時間 535 ms
コンパイル使用メモリ 65,592 KB
実行使用メモリ 6,944 KB
最終ジャッジ日時 2024-07-06 04:12:51
合計ジャッジ時間 1,323 ms
ジャッジサーバーID
(参考情報)
judge1 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 33
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <cmath>
#include <iostream>
#include <vector>

using namespace std;

int main() {
    int t;
    cin >> t;

    vector<int> v(t);
    for (int i = 0; i < t; ++i)
        cin >> v[i];

    if (abs(v[0] - 0) != 1) {
        cout << "F\n";
        return 0;
    }
    for (int i = 1; i < t; ++i) {
        if (abs(v[i] - v[i - 1]) != 1) {
            cout << "F\n";
            return 0;
        }
    }
    cout << "T\n";
}
0