結果
| 問題 | No.3387 23578 Sequence |
| コンテスト | |
| ユーザー |
ks2m
|
| 提出日時 | 2025-11-28 22:13:09 |
| 言語 | Java (openjdk 25.0.2) |
| 結果 |
AC
|
| 実行時間 | 60 ms / 2,000 ms |
| + 13µs | |
| コード長 | 447 bytes |
| 記録 | |
| コンパイル時間 | 3,365 ms |
| コンパイル使用メモリ | 83,840 KB |
| 実行使用メモリ | 43,224 KB |
| 最終ジャッジ日時 | 2026-07-17 01:34:54 |
| 合計ジャッジ時間 | 6,797 ms |
|
ジャッジサーバーID (参考情報) |
judge3_0 / judge1_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 28 |
ソースコード
import java.util.Scanner;
public class Main {
public static void main(String[] args) throws Exception {
Scanner sc = new Scanner(System.in);
int n = sc.nextInt();
int[] a = new int[n];
for (int i = 0; i < n; i++) {
a[i] = sc.nextInt();
}
sc.close();
int s = a[0] + a[n - 1];
for (int i = 0; i < n; i++) {
if (a[i] + a[n - 1 - i] != s) {
System.out.println("No");
return;
}
}
System.out.println("Yes");
}
}
ks2m