結果

問題 No.627 ランダムウォークの軌跡
ユーザー KoshStormKoshStorm
提出日時 2018-01-05 21:38:04
言語 C++14
(gcc 12.3.0 + boost 1.83.0)
結果
AC  
実行時間 2 ms / 2,000 ms
コード長 1,182 bytes
コンパイル時間 1,391 ms
コンパイル使用メモリ 163,504 KB
実行使用メモリ 4,380 KB
最終ジャッジ日時 2023-08-24 20:34:10
合計ジャッジ時間 2,615 ms
ジャッジサーバーID
(参考情報)
judge12 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 1 ms
4,380 KB
testcase_01 AC 1 ms
4,376 KB
testcase_02 AC 1 ms
4,376 KB
testcase_03 AC 1 ms
4,380 KB
testcase_04 AC 2 ms
4,376 KB
testcase_05 AC 1 ms
4,380 KB
testcase_06 AC 1 ms
4,380 KB
testcase_07 AC 1 ms
4,380 KB
testcase_08 AC 2 ms
4,380 KB
testcase_09 AC 2 ms
4,380 KB
testcase_10 AC 2 ms
4,376 KB
testcase_11 AC 1 ms
4,376 KB
testcase_12 AC 1 ms
4,376 KB
testcase_13 AC 2 ms
4,380 KB
testcase_14 AC 2 ms
4,380 KB
testcase_15 AC 2 ms
4,376 KB
testcase_16 AC 2 ms
4,380 KB
testcase_17 AC 1 ms
4,380 KB
testcase_18 AC 1 ms
4,376 KB
testcase_19 AC 2 ms
4,376 KB
testcase_20 AC 1 ms
4,380 KB
testcase_21 AC 2 ms
4,380 KB
testcase_22 AC 1 ms
4,376 KB
testcase_23 AC 2 ms
4,380 KB
testcase_24 AC 1 ms
4,380 KB
testcase_25 AC 1 ms
4,376 KB
testcase_26 AC 2 ms
4,376 KB
testcase_27 AC 1 ms
4,380 KB
testcase_28 AC 1 ms
4,376 KB
testcase_29 AC 1 ms
4,380 KB
testcase_30 AC 2 ms
4,376 KB
testcase_31 AC 1 ms
4,380 KB
testcase_32 AC 2 ms
4,376 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <bits/stdc++.h>
#define REP(i,n) for (int i=0;i<(n);i++)
#define FOR(i,a,b) for (int i=(a);i<(b);i++)
#define dump1d_arr(array) REP(i,array.size()) cerr << #array << "[" << (i) << "] ==> " << (array[i]) << endl;
#define dump2d_arr(array) REP(i,array.size()) REP(j,array[i].size()) cerr << #array << "[" << (i) << "]" << "[" << (j) << "] ==> " << (array[i][j]) << endl;
#define dump(x)  cerr << #x << " => " << (x) << endl;
#define CLR(vec) { REP(i,vec.size()) vec[i] = 0; } 
#define loINF (long)10000000000
#define shINF (short)10000
#define SORT(c) sort((c).begin(),(c).end())

using namespace std;
typedef vector<int> VI;
typedef vector<VI> VVI;

int main(void){
	short T;
	cin >> T;
	/*VVI dp(T+1,VI(201,0));
	dp[0][100] = 1;
	FOR(i,1,T){
		REP(j,201){
			if (j + 1 > 200) dp[i][j] = dp[i-1][j-1];
			else {
				if (j - 1 < 0) dp[i][j] = dp[i-1][j+1];
				else dp[i][j] = (dp[i-1][j+1] || dp[i-1][j-1]);
			}
		}
		if (dp[i][j])
	}*/
	short next_point;
	short point = 0;
	short ans = 0;
	REP(i,T) {
		cin >> next_point;
		if (abs((point) - (next_point)) != 1) ans = 1;
		point = next_point;
	}

	if (ans == 1) cout << "F" << endl;
	else cout << "T" << endl;
	return 0;
}
0