結果
問題 |
No.627 ランダムウォークの軌跡
|
ユーザー |
![]() |
提出日時 | 2018-01-05 21:22:43 |
言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
結果 |
AC
|
実行時間 | 2 ms / 2,000 ms |
コード長 | 316 bytes |
コンパイル時間 | 715 ms |
コンパイル使用メモリ | 58,836 KB |
実行使用メモリ | 5,248 KB |
最終ジャッジ日時 | 2024-12-23 06:15:20 |
合計ジャッジ時間 | 1,724 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 33 |
ソースコード
#include <iostream> #include <vector> #include <algorithm> #include <string> using namespace std; int main() { int n; cin >> n; int p = 0; bool flag = true; for (int i = 0; i < n; i++) { int x; cin >> x; if (abs(x - p) != 1)flag = false; p = x; } cout << (flag ? "T" : "F") << endl; return 0; }