結果

問題 No.627 ランダムウォークの軌跡
ユーザー aitdccd
提出日時 2018-01-06 17:34:55
言語 C++14
(gcc 13.3.0 + boost 1.87.0)
結果
WA  
実行時間 -
コード長 567 bytes
コンパイル時間 1,674 ms
コンパイル使用メモリ 169,376 KB
実行使用メモリ 6,816 KB
最終ジャッジ日時 2024-12-23 08:41:01
合計ジャッジ時間 2,649 ms
ジャッジサーバーID
(参考情報)
judge1 / judge5
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 32 WA * 1
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <bits/stdc++.h>

using namespace std;

#define REP(i, n) for(int i = 0; i < n; i++)
#define FOR(i, m, n) for(int i = m; i < n; i++)

int main() {
    ios::sync_with_stdio(false);
    cin.tie(0);

    int t;
    cin >> t;

    vector<int> x(t);
    REP(i, t) cin >> x[i];
    if (x[0] == 0) {
        cout << "F" << endl;
        return 0;
    } else {
        FOR(i, 1, t - 1) {
            if (abs(x[i] - x[i + 1]) != 1) {
                cout << "F" << endl;
                return 0;
            }
        }
    }
    cout << "T" << endl;
    return 0;
}
0