結果

問題 No.627 ランダムウォークの軌跡
ユーザー newcomer
提出日時 2018-02-09 19:01:25
言語 C++11(廃止可能性あり)
(gcc 13.3.0)
結果
AC  
実行時間 5 ms / 2,000 ms
コード長 420 bytes
コンパイル時間 452 ms
コンパイル使用メモリ 54,988 KB
実行使用メモリ 5,248 KB
最終ジャッジ日時 2024-10-08 00:20:30
合計ジャッジ時間 1,622 ms
ジャッジサーバーID
(参考情報)
judge3 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 33
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <iostream>
using namespace std;

int main()
{
	int t, x;
	int y = 0;
	bool checkert = true;
	bool checkerf = false;
	
	cin >> t;
		for (int i = 0; i < t; i++) {
			cin >> x;
			if (x == y + 1 || x == y - 1) {
				checkert = true;
			}
			else {
				checkerf = true;
			}
			y = x;
	}
		if (checkerf == true) {
			cout << "F" << endl;
		}
		else if(checkert == true) {
			cout << "T" << endl;
		}
    return 0;
}
0