結果
問題 | No.627 ランダムウォークの軌跡 |
ユーザー |
![]() |
提出日時 | 2018-01-05 21:39:41 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 398 bytes |
コンパイル時間 | 1,307 ms |
コンパイル使用メモリ | 166,168 KB |
実行使用メモリ | 6,824 KB |
最終ジャッジ日時 | 2024-12-23 06:27:44 |
合計ジャッジ時間 | 2,208 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 24 WA * 9 |
ソースコード
#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; }