結果

問題 No.627 ランダムウォークの軌跡
ユーザー appren
提出日時 2019-08-20 23:24:43
言語 C++11(廃止可能性あり)
(gcc 13.3.0)
結果
AC  
実行時間 2 ms / 2,000 ms
コード長 359 bytes
コンパイル時間 1,197 ms
コンパイル使用メモリ 157,404 KB
実行使用メモリ 6,820 KB
最終ジャッジ日時 2024-10-06 16:14:00
合計ジャッジ時間 2,108 ms
ジャッジサーバーID
(参考情報)
judge5 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 33
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <bits/stdc++.h>
using namespace std;
int main(){
    int n;
    cin>>n;
    int s=0;
    for(int i=0; i<n; i++){
        int c;
        cin>>c;
        if(c==s+1||c==s-1){
            s=c;
            if(i==n-1){
                cout<<'T'<<endl;
                break;}
        }else{
            cout<<'F'<<endl;
            break;
        }
    }
}
0