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