結果
問題 | No.1280 Beyond C |
ユーザー |
![]() |
提出日時 | 2021-05-18 07:56:07 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 580 bytes |
コンパイル時間 | 7,487 ms |
コンパイル使用メモリ | 341,172 KB |
実行使用メモリ | 6,820 KB |
最終ジャッジ日時 | 2024-10-08 01:53:05 |
合計ジャッジ時間 | 6,069 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 4 WA * 19 |
ソースコード
#include <bits/stdc++.h> using namespace std; #include <boost/multiprecision/cpp_int.hpp> typedef boost::multiprecision::cpp_int mp; int main(){ int N,M; long long C; cin>>N>>M>>C; vector<long long> A(N),B(M); for(int i=0;i<N;++i){ cin>>A[i]; } for(int i=0;i<M;++i){ cin>>B[i]; } sort(A.begin(),A.end()); sort(B.begin(),B.end()); long long ans=0; int a=0,b=M-1; while(a<N){ if(A[a]*B[b]>C){ --b; }else{ ans+=M-b-1; ++a; } } cout<<ans<<endl; }