結果
| 問題 | No.989 N×Mマス計算(K以上) | 
| コンテスト | |
| ユーザー |  | 
| 提出日時 | 2020-08-18 22:38:04 | 
| 言語 | C++17 (gcc 13.3.0 + boost 1.87.0) | 
| 結果 | 
                                WA
                                 
                             | 
| 実行時間 | - | 
| コード長 | 412 bytes | 
| コンパイル時間 | 2,668 ms | 
| コンパイル使用メモリ | 197,520 KB | 
| 最終ジャッジ日時 | 2025-01-13 03:30:52 | 
| ジャッジサーバーID (参考情報) | judge5 / judge2 | 
(要ログイン)
| ファイルパターン | 結果 | 
|---|---|
| sample | AC * 2 | 
| other | AC * 11 WA * 7 | 
ソースコード
#include<bits/stdc++.h>
using namespace std;
int main(){
	cin.tie(0),ios::sync_with_stdio(false);
	int n,m,k; char op; cin>>n>>m>>k>>op;
	vector<int>a(n),b(m); for(auto&&i:b)cin>>i; for(auto&&i:a)cin>>i;
	sort(b.begin(),b.end());
	int64_t ans=0;
	for(auto&&i:a){
		if(op=='+')ans+=b.end()-lower_bound(b.begin(),b.end(),k-i);
		else ans+=b.end()-lower_bound(b.begin(),b.end(),(k-i+1)/i);
	}
	cout<<ans<<"\n"s;
}
            
            
            
        