結果
問題 | No.989 N×Mマス計算(K以上) |
ユーザー |
|
提出日時 | 2020-02-14 21:55:33 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 455 bytes |
コンパイル時間 | 754 ms |
コンパイル使用メモリ | 75,280 KB |
実行使用メモリ | 6,824 KB |
最終ジャッジ日時 | 2024-10-06 11:33:27 |
合計ジャッジ時間 | 1,733 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 2 |
other | AC * 12 WA * 6 |
ソースコード
#include <algorithm>#include <iostream>#include <vector>using namespace std;int main() {int N, M, K, A;char op;cin >> N >> M >> K >> op;vector<int> B(M);for (int& i : B) cin >> i;sort(B.begin(), B.end());long ans = 0;for (int i = 0; i < N; i++) {cin >> A;if (op == '+') ans += B.end() - lower_bound(B.begin(), B.end(), K - A);else ans += B.end() - lower_bound(B.begin(), B.end(), K / A);}cout << ans;}