結果
問題 |
No.1280 Beyond C
|
ユーザー |
![]() |
提出日時 | 2020-11-09 09:23:59 |
言語 | Java (openjdk 23) |
結果 |
WA
|
実行時間 | - |
コード長 | 769 bytes |
コンパイル時間 | 2,263 ms |
コンパイル使用メモリ | 74,644 KB |
実行使用メモリ | 69,284 KB |
最終ジャッジ日時 | 2024-07-22 15:57:47 |
合計ジャッジ時間 | 10,928 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 10 WA * 13 |
ソースコード
import java.util.*; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int n = sc.nextInt(); int m = sc.nextInt(); long c = sc.nextLong(); int[] aArr = new int[n]; for (int i = 0; i < n; i++) { aArr[i] = sc.nextInt(); } Arrays.sort(aArr); int[] bArr = new int[m]; for (int i = 0; i < m; i++) { bArr[i] = sc.nextInt(); } long count = 0; int idx = m; for (int i = 0; i < n; i++) { while (idx > 0 && (long)aArr[i] * bArr[idx - 1] > c) { idx--; } count += m - idx; } System.out.println((double)count / n / m); } }