結果

問題 No.627 ランダムウォークの軌跡
コンテスト
ユーザー ebicochineal
提出日時 2018-01-05 21:39:41
言語 C++14
(gcc 15.3.0 + boost 1.92.0 + ACL)
コンパイル:
g++-15 -O2 -fplugin=/usr/lib/yukicoder/noavx512-gcc15.so -lm -std=c++14 -Wuninitialized -DONLINE_JUDGE -o a.out _filename_
実行:
./a.out
結果
WA  
実行時間 -
コード長 398 bytes
記録
記録タグの例:
初AC ショートコード 純ショートコード 純主流ショートコード 最速実行時間
コンパイル時間 829 ms
コンパイル使用メモリ 184,108 KB
実行使用メモリ 9,920 KB
最終ジャッジ日時 2026-10-06 09:42:09
合計ジャッジ時間 2,412 ms
ジャッジサーバーID
(参考情報)
judge3_0 / judge2_0
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 24 WA * 9
権限があれば一括ダウンロードができます

ソースコード

diff #
raw source code

#include <bits/stdc++.h>
using namespace std;

int main() {
    cin.tie(0);
    ios::sync_with_stdio(false);
    bool b = true;
    int n;
    cin >> n;
    for (int i = 1; i < n + 1; ++i) {
        int t;
        cin >> t;
        if ((abs(t) % 2 > 0) != (i % 2 > 0) && abs(t) > i) {
            b = false;
            break;
        }
    }
    cout << (b ? 'T' : 'F') << endl;
    return 0;
}


0