結果
| 問題 | No.512 魔法少女の追いかけっこ |
| コンテスト | |
| ユーザー |
akitsu818
|
| 提出日時 | 2017-05-05 22:38:49 |
| 言語 | Java (openjdk 23) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 552 bytes |
| 記録 | |
| コンパイル時間 | 2,222 ms |
| コンパイル使用メモリ | 74,840 KB |
| 実行使用メモリ | 42,020 KB |
| 最終ジャッジ日時 | 2024-06-27 05:59:46 |
| 合計ジャッジ時間 | 11,092 ms |
|
ジャッジサーバーID (参考情報) |
judge5 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 36 WA * 17 |
ソースコード
import java.util.Scanner;
public class Main {
public static void main(String args[]){
Scanner cin = new Scanner(System.in);
int X = cin.nextInt();
int Y = cin.nextInt();
int N = cin.nextInt();
int A[] = new int[N];
long sum = 0L;
boolean result = true;
double rate = (Y-X)/X;
for(int i=1;i<=N;i++){
A[i-1] = cin.nextInt();
if(i>1){
if(sum*rate>A[i-1]){
result = false;
break;
}
}
sum += (long)A[i-1];
}
if(result){
System.out.println("YES");
}else{
System.out.println("NO");
}
}
}
akitsu818