結果

問題 No.1280 Beyond C
ユーザー chacoder1
提出日時 2020-12-07 23:41:24
言語 C++17
(gcc 13.3.0 + boost 1.87.0)
結果
WA  
実行時間 -
コード長 499 bytes
コンパイル時間 2,376 ms
コンパイル使用メモリ 194,656 KB
最終ジャッジ日時 2025-01-16 19:07:44
ジャッジサーバーID
(参考情報)
judge3 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 12 WA * 5 TLE * 6
権限があれば一括ダウンロードができます

ソースコード

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


 
0