結果
| 問題 | 
                            No.627 ランダムウォークの軌跡
                             | 
                    
| コンテスト | |
| ユーザー | 
                             hiyori
                         | 
                    
| 提出日時 | 2019-02-10 15:47:09 | 
| 言語 | C++14  (gcc 13.3.0 + boost 1.87.0)  | 
                    
| 結果 | 
                             
                                WA
                                 
                             
                            
                         | 
                    
| 実行時間 | - | 
| コード長 | 416 bytes | 
| コンパイル時間 | 515 ms | 
| コンパイル使用メモリ | 63,644 KB | 
| 実行使用メモリ | 6,948 KB | 
| 最終ジャッジ日時 | 2024-07-06 11:09:56 | 
| 合計ジャッジ時間 | 1,599 ms | 
| 
                            ジャッジサーバーID (参考情報)  | 
                        judge2 / judge1 | 
(要ログイン)
| ファイルパターン | 結果 | 
|---|---|
| other | AC * 9 WA * 24 | 
ソースコード
 #include<iostream>
 #include<stdlib.h>
 using namespace std;
 int main()
 {
    int T,x,sub_x=0,flag=1;
    cin>>T;
    for(int i=0; i<T; i++){
        cin>>x;
        if(i==0){ continue;}
        else{
            if(x-sub_x!=1 || x-sub_x!=-1){
                flag=0;
            }
            else { continue; }
        }
        sub_x = x;
    }
    cout<<(flag ? "T" : "F")<<endl;
    return EXIT_SUCCESS;
 }
            
            
            
        
            
hiyori