結果

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

ソースコード

diff #

#include<iostream>
#include<string>
#include<algorithm>
#include<cmath>
#include<iomanip>
#include<cstring>
#include<map>
#include<vector>
#include<queue>
#include<utility>
using namespace std;
typedef long long int ll;

int main(){

  int t, x[100];
  cin >> t;
  for(int i=0; i<t; i++){
    cin >> x[i];
  }
    if(abs(x[0])!=1){
      cout << "F" << endl;
      return 0;
    }  
  for(int i=0; i<t-1; i++){
    if(abs(x[i]-x[i+1])!=1){
      cout << "F" << endl;
      return 0;
    }
  }

  cout << "T" << endl;

  return 0;
}
0