結果
問題 |
No.627 ランダムウォークの軌跡
|
ユーザー |
![]() |
提出日時 | 2019-11-23 13:26:27 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 378 bytes |
コンパイル時間 | 647 ms |
コンパイル使用メモリ | 70,804 KB |
実行使用メモリ | 6,820 KB |
最終ジャッジ日時 | 2024-10-11 06:55:52 |
合計ジャッジ時間 | 1,842 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 31 WA * 2 |
ソースコード
#include <iostream> #include <algorithm> #include <math.h> using namespace std; int main(){ int n; cin >> n; int a[n]; for ( int i = 0; i < n; i ++ ) { cin >> a[i]; } string ans = "T"; for ( int i = 0; i < n-1; i++ ){ int d = abs( a[i] - a[i+1] ); if ( d != 1 ) ans = "F"; } cout << ans << endl; return 0; }