QOJ.ac
QOJ
ID | 题目 | 提交者 | 结果 | 用时 | 内存 | 语言 | 文件大小 | 提交时间 | 测评时间 |
---|---|---|---|---|---|---|---|---|---|
#699241 | #6773. True Story | jkliao# | RE | 0ms | 0kb | C++17 | 608b | 2024-11-02 07:37:10 | 2024-11-02 07:37:11 |
answer
#include <algorithm>
#include <iostream>
#include <vector>
using ll = long long;
using namespace std;
int main() {
int n, k;
ll x;
vector<ll> p(k + 1);
vector<ll> t(k + 1, 0);
cin >> n >> k >> x;
cin >> p[0];
vector<ll> s(n);
for (int i = 0; i < n; i++)
cin >> s[i];
for (int i = 1; i <= k; i++)
cin >> t[i];
for (int i = 1; i <= k; i++)
cin >> p[i];
sort(s.begin(), s.end());
int pt = n - 1;
for (int i = 0; i <= k; i++) {
while ((pt >= 0) && ((s[pt] * (p[i] - t[i])) >= x)) {
pt--;
}
}
cout << n - (pt + 1) << endl;
}
详细
Test #1:
score: 0
Runtime Error
input:
4 3 10 4 1 5 2 1 3 4 5 7 9 10
output:
2