結果

問題 No.1280 Beyond C
ユーザー chacoder1chacoder1
提出日時 2020-12-07 23:43:28
言語 C++17
(gcc 12.3.0 + boost 1.83.0)
結果
TLE  
実行時間 -
コード長 515 bytes
コンパイル時間 2,182 ms
コンパイル使用メモリ 204,264 KB
実行使用メモリ 8,600 KB
最終ジャッジ日時 2023-10-17 16:45:33
合計ジャッジ時間 8,020 ms
ジャッジサーバーID
(参考情報)
judge11 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 2 ms
4,348 KB
testcase_01 AC 2 ms
4,348 KB
testcase_02 AC 1 ms
4,348 KB
testcase_03 AC 1 ms
4,348 KB
testcase_04 AC 2 ms
4,348 KB
testcase_05 AC 2 ms
4,348 KB
testcase_06 AC 2 ms
4,348 KB
testcase_07 AC 2 ms
4,348 KB
testcase_08 AC 2 ms
4,348 KB
testcase_09 AC 2 ms
4,348 KB
testcase_10 AC 2 ms
4,348 KB
testcase_11 AC 2 ms
4,348 KB
testcase_12 AC 2 ms
4,348 KB
testcase_13 AC 2 ms
4,348 KB
testcase_14 AC 2 ms
4,348 KB
testcase_15 AC 604 ms
4,348 KB
testcase_16 AC 853 ms
4,348 KB
testcase_17 AC 265 ms
4,348 KB
testcase_18 TLE -
testcase_19 -- -
testcase_20 -- -
testcase_21 -- -
testcase_22 -- -
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <bits/stdc++.h>
using namespace std;

int A[100100];
int B[100100];

int main(){
  long long N,M,C;
  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);
  int cnt=0;
  
  for(int i=0;i<N;i++){
    for(int j=0;j<M;j++){
      if((double)C/A[i]<(double)B[j]){
        cnt+=(M-j);
        break;
      }
    }
  }
  //cout<<cnt<<endl;
  //cout<<N*M<<endl;
  cout<<setprecision(10)<<(double)(cnt)/(N*M)<<endl;
  
  return 0;
}


 
0