結果
| 問題 |
No.627 ランダムウォークの軌跡
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2018-04-14 18:13:45 |
| 言語 | C (gcc 13.3.0) |
| 結果 |
RE
|
| 実行時間 | - |
| コード長 | 370 bytes |
| コンパイル時間 | 467 ms |
| コンパイル使用メモリ | 29,696 KB |
| 実行使用メモリ | 6,948 KB |
| 最終ジャッジ日時 | 2024-06-26 22:31:59 |
| 合計ジャッジ時間 | 1,623 ms |
|
ジャッジサーバーID (参考情報) |
judge2 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | RE * 33 |
ソースコード
#include <stdio.h>
#include <stdlib.h>
void main(void)
{
char tf[] = "TF";
short t;
scanf("%hd", &t);
short *x = malloc(sizeof(short)*t);
for (short i = 0; i < t; i++) scanf("%hd", &x[i]);
short p = 0;
short xorf = 0;
for (short i = 0; i < t; i++) {
if (!(p == x[i] + 1 || p == x[i] - 1)) xorf = 1;
p = x[i];
}
printf("%c\n", tf[xorf]);
}