結果

問題 No.627 ランダムウォークの軌跡
ユーザー koma3tabi3
提出日時 2018-04-10 19:08:54
言語 C++11(廃止可能性あり)
(gcc 13.3.0)
結果
AC  
実行時間 2 ms / 2,000 ms
コード長 344 bytes
コンパイル時間 677 ms
コンパイル使用メモリ 59,152 KB
実行使用メモリ 6,944 KB
最終ジャッジ日時 2024-06-26 20:55:51
合計ジャッジ時間 1,476 ms
ジャッジサーバーID
(参考情報)
judge5 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 33
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <iostream>
#include <string>
#include <math.h>
using namespace std;

int main()
{
	string ans="T";
	int t;
	cin >> t;
	int x[101];
	x[0] = 0;
	for (int i = 1; i < t+1; ++i)
	{
		cin >> x[i];
		if (abs(x[i] - x[i - 1] )!= 1) ans="F";

	}
    cout << ans << endl;

	fflush (stdin);
	getchar ();
	fflush (stdin);
	getchar ();
	return 0;
}
0