結果
問題 |
No.627 ランダムウォークの軌跡
|
ユーザー |
|
提出日時 | 2018-01-06 17:37:18 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 2 ms / 2,000 ms |
コード長 | 572 bytes |
コンパイル時間 | 1,673 ms |
コンパイル使用メモリ | 169,504 KB |
実行使用メモリ | 5,248 KB |
最終ジャッジ日時 | 2024-12-23 08:41:10 |
合計ジャッジ時間 | 2,711 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 33 |
ソースコード
#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 (abs(x[0]) != 1) { cout << "F" << endl; return 0; } else { FOR(i, 0, t - 1) { if (abs(x[i] - x[i + 1]) != 1) { cout << "F" << endl; return 0; } } } cout << "T" << endl; return 0; }