結果

問題 No.1280 Beyond C
ユーザー kotatsugamekotatsugame
提出日時 2020-11-07 23:50:50
言語 C++14
(gcc 12.3.0 + boost 1.83.0)
結果
AC  
実行時間 83 ms / 2,000 ms
コード長 376 bytes
コンパイル時間 617 ms
コンパイル使用メモリ 75,016 KB
実行使用メモリ 5,212 KB
最終ジャッジ日時 2023-09-29 21:01:46
合計ジャッジ時間 2,094 ms
ジャッジサーバーID
(参考情報)
judge15 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 2 ms
4,376 KB
testcase_01 AC 1 ms
4,376 KB
testcase_02 AC 1 ms
4,380 KB
testcase_03 AC 1 ms
4,376 KB
testcase_04 AC 1 ms
4,380 KB
testcase_05 AC 2 ms
4,376 KB
testcase_06 AC 1 ms
4,380 KB
testcase_07 AC 1 ms
4,380 KB
testcase_08 AC 2 ms
4,376 KB
testcase_09 AC 2 ms
4,376 KB
testcase_10 AC 1 ms
4,376 KB
testcase_11 AC 2 ms
4,376 KB
testcase_12 AC 1 ms
4,376 KB
testcase_13 AC 2 ms
4,380 KB
testcase_14 AC 2 ms
4,376 KB
testcase_15 AC 43 ms
4,468 KB
testcase_16 AC 37 ms
4,380 KB
testcase_17 AC 43 ms
4,480 KB
testcase_18 AC 73 ms
5,212 KB
testcase_19 AC 76 ms
5,196 KB
testcase_20 AC 79 ms
5,092 KB
testcase_21 AC 83 ms
5,116 KB
testcase_22 AC 82 ms
5,124 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
main.cpp:6:1: 警告: ISO C++ では型の無い ‘main’ の宣言を禁止しています [-Wreturn-type]
    6 | main()
      | ^~~~

ソースコード

diff #

#include<iostream>
#include<iomanip>
#include<algorithm>
using namespace std;
long N,M,C,A[1<<17],B[1<<17];
main()
{
	cin>>N>>M>>C;
	for(int i=0;i<N;i++)cin>>A[i];
	for(int i=0;i<M;i++)cin>>B[i];
	sort(A,A+N);
	sort(B,B+M);
	long ans=0;
	int j=M;
	for(int i=0;i<N;i++)
	{
		while(j>0&&B[j-1]*A[i]>C)j--;
		ans+=M-j;
	}
	cout<<fixed<<setprecision(16)<<ans/(double)N/M<<endl;
}
0