結果
問題 | No.1736 Princess vs. Dragoness |
ユーザー | merlin |
提出日時 | 2021-11-12 21:35:52 |
言語 | Java21 (openjdk 21) |
結果 |
WA
|
実行時間 | - |
コード長 | 953 bytes |
コンパイル時間 | 1,937 ms |
コンパイル使用メモリ | 77,976 KB |
実行使用メモリ | 51,524 KB |
最終ジャッジ日時 | 2024-05-04 07:37:42 |
合計ジャッジ時間 | 5,049 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge2 |
(要ログイン)
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | AC | 48 ms
50,168 KB |
testcase_01 | AC | 49 ms
50,228 KB |
testcase_02 | AC | 51 ms
49,956 KB |
testcase_03 | WA | - |
testcase_04 | AC | 57 ms
50,188 KB |
testcase_05 | AC | 49 ms
49,956 KB |
testcase_06 | AC | 75 ms
50,636 KB |
testcase_07 | AC | 75 ms
51,480 KB |
testcase_08 | AC | 57 ms
50,284 KB |
testcase_09 | AC | 68 ms
51,448 KB |
testcase_10 | AC | 49 ms
50,160 KB |
testcase_11 | WA | - |
testcase_12 | WA | - |
testcase_13 | AC | 75 ms
51,380 KB |
testcase_14 | WA | - |
testcase_15 | AC | 53 ms
50,112 KB |
testcase_16 | AC | 50 ms
50,276 KB |
testcase_17 | WA | - |
testcase_18 | AC | 64 ms
51,404 KB |
testcase_19 | AC | 75 ms
51,152 KB |
testcase_20 | AC | 53 ms
50,376 KB |
testcase_21 | WA | - |
testcase_22 | AC | 75 ms
51,240 KB |
testcase_23 | WA | - |
testcase_24 | AC | 50 ms
50,100 KB |
testcase_25 | AC | 56 ms
50,396 KB |
testcase_26 | WA | - |
testcase_27 | WA | - |
testcase_28 | WA | - |
testcase_29 | WA | - |
testcase_30 | WA | - |
testcase_31 | AC | 54 ms
50,348 KB |
testcase_32 | WA | - |
testcase_33 | WA | - |
testcase_34 | WA | - |
testcase_35 | AC | 52 ms
50,412 KB |
ソースコード
import java.io.*; import java.util.*; class Main { public static void main(String args[])throws Exception { BufferedReader bu=new BufferedReader(new InputStreamReader(System.in)); StringBuilder sb=new StringBuilder(); String s[]=bu.readLine().split(" "); int n=Integer.parseInt(s[0]),a=Integer.parseInt(s[1]),b=Integer.parseInt(s[2]),x=Integer.parseInt(s[3]),y=Integer.parseInt(s[4]); int i; long h[]=new long[n]; s=bu.readLine().split(" "); for(i=0;i<n;i++) h[i]=Integer.parseInt(s[i]); long ded=1l*a*x; for(i=0;i<n;i++) h[i]-=ded; ded=1l*b*y; boolean ans=true; for(i=0;i<n;i++) { long tem=Math.max(0,Math.min(ded,h[i])); h[i]-=tem; ded-=tem; if(h[i]>0) {ans=false; break;} } if(ans) sb.append("Yes\n"); else sb.append("No\n"); System.out.print(sb); } }