結果
問題 | No.627 ランダムウォークの軌跡 |
ユーザー |
![]() |
提出日時 | 2018-01-08 21:18:22 |
言語 | C (gcc 13.3.0) |
結果 |
AC
|
実行時間 | 2 ms / 2,000 ms |
コード長 | 274 bytes |
コンパイル時間 | 560 ms |
コンパイル使用メモリ | 28,672 KB |
実行使用メモリ | 5,248 KB |
最終ジャッジ日時 | 2024-12-23 12:28:55 |
合計ジャッジ時間 | 1,613 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 33 |
ソースコード
#include<stdio.h> int main(void){ int t,x; char Ans = 'T'; int prev = 0; int cal = 0; scanf("%d",&t); int i; for(i = 0; i < t; i++){ scanf("%d",&x); cal = x - prev; if(cal != 1 && cal != -1){ Ans = 'F'; } prev = x; } printf("%c\n",Ans); return 0; }