結果
| 問題 | No.627 ランダムウォークの軌跡 | 
| コンテスト | |
| ユーザー |  chacoder1 | 
| 提出日時 | 2020-11-22 11:59:16 | 
| 言語 | C++17 (gcc 13.3.0 + boost 1.87.0) | 
| 結果 | 
                                AC
                                 
                             | 
| 実行時間 | 2 ms / 2,000 ms | 
| コード長 | 363 bytes | 
| コンパイル時間 | 2,131 ms | 
| コンパイル使用メモリ | 192,788 KB | 
| 最終ジャッジ日時 | 2025-01-16 04:18:42 | 
| ジャッジサーバーID (参考情報) | judge3 / judge4 | 
(要ログイン)
| ファイルパターン | 結果 | 
|---|---|
| other | AC * 33 | 
ソースコード
#include <bits/stdc++.h>
using namespace std;
int main(){
  int t;
  cin>>t;
  int p[t];
  for(int i=0;i<t;i++){
    cin>>p[i];
    if(i==0){
      if(p[i]==1||p[i]==-1){
        continue;
      }
    }
    if(p[i]==p[i-1]+1 || p[i] == p[i-1]-1){
      continue;
    }
    else{
      cout<<"F"<<endl;
      return 0;
    }
  }
  cout<<"T"<<endl;
  return 0;
}
            
            
            
        