結果
| 問題 |
No.1280 Beyond C
|
| コンテスト | |
| ユーザー |
higopon_
|
| 提出日時 | 2020-11-06 22:10:06 |
| 言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 742 bytes |
| コンパイル時間 | 1,727 ms |
| コンパイル使用メモリ | 171,548 KB |
| 実行使用メモリ | 5,376 KB |
| 最終ジャッジ日時 | 2024-07-22 12:54:54 |
| 合計ジャッジ時間 | 3,429 ms |
|
ジャッジサーバーID (参考情報) |
judge1 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 22 WA * 1 |
ソースコード
#include<bits/stdc++.h>
using namespace std;
#define rep(i,n) for(int i=0;i<(n);i++)
#define PI acos(-1)
#define all(v) v.begin(),v.end()
typedef long long ll;
ll gcd(ll x,ll y){
if(y==0) return x;
else return gcd(y,x%y);
}
ll lcm(ll x,ll y){
return x/gcd(x,y)*y;
}
int main(){
ll n,m,c;
cin>>n>>m>>c;
vector<int> a(n);
vector<int> b(m);
rep(i,n){
cin>>a[i];
}
rep(i,m){
cin>>b[i];
}
ll bunbo=n*m;
ll bunsi=0;
sort(all(b));
rep(i,n){
int x=a[i];
double y=double(c)/x;
auto itr=upper_bound(all(b),y);
bunsi+=b.end()-itr;
//cout<<b.end()-itr<<endl;
}
double ans=double(bunsi)/bunbo;
cout<<setprecision(10)<<ans<<endl;
return 0;
}
higopon_