結果
| 問題 |
No.135 とりあえず1次元の問題
|
| コンテスト | |
| ユーザー |
FVRChan
|
| 提出日時 | 2017-09-24 16:20:07 |
| 言語 | Java (openjdk 23) |
| 結果 |
TLE
|
| 実行時間 | - |
| コード長 | 457 bytes |
| コンパイル時間 | 2,146 ms |
| コンパイル使用メモリ | 74,908 KB |
| 実行使用メモリ | 124,268 KB |
| 最終ジャッジ日時 | 2024-11-14 07:12:11 |
| 合計ジャッジ時間 | 36,804 ms |
|
ジャッジサーバーID (参考情報) |
judge4 / judge1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 2 |
| other | AC * 17 WA * 1 TLE * 4 |
ソースコード
import java.util.Scanner;
public class Main{
public static void main(String args[])throws Exception{
Scanner sc=new Scanner(System.in);
int n=Integer.parseInt(sc.nextLine());
int are[]=new int[n];
int min=999999999;
for(int i=0;i<n;i++)are[i]=sc.nextInt();
for(int i=0;i<are.length;i++){
for(int j=i+1;j<are.length;j++){
if(are[i] != are[j]){
min=Math.min(min,Math.abs(are[i]-are[j]));
}
}
}
System.out.println(min);
}
}
FVRChan