結果
| 問題 |
No.989 N×Mマス計算(K以上)
|
| コンテスト | |
| ユーザー |
%20
|
| 提出日時 | 2020-02-05 01:14:57 |
| 言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
AC
|
| 実行時間 | 28 ms / 2,000 ms |
| コード長 | 393 bytes |
| コンパイル時間 | 2,163 ms |
| コンパイル使用メモリ | 197,820 KB |
| 最終ジャッジ日時 | 2025-01-08 22:09:03 |
|
ジャッジサーバーID (参考情報) |
judge3 / judge1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 2 |
| other | AC * 18 |
ソースコード
#include<bits/stdc++.h>
using namespace std;
using ll=long long;
int main(){cin.tie(0);ios::sync_with_stdio(false);
int N,M,K;cin>>N>>M>>K;
string op;cin>>op;
vector<int>B(M);
for(int i=0;i<M;++i){
cin>>B[i];
}
sort(B.begin(),B.end());
ll z=0;
for(int i=0;i<N;++i){
int A;cin>>A;
z+=B.end()-lower_bound(B.begin(),B.end(),op=="+"?K-A:(K-1)/A+1);
}
cout<<z<<"\n";
return 0;
}
%20