QOJ.ac
QOJ
ID | 题目 | 提交者 | 结果 | 用时 | 内存 | 语言 | 文件大小 | 提交时间 | 测评时间 |
---|---|---|---|---|---|---|---|---|---|
#699237 | #6773. True Story | jkliao# | RE | 0ms | 3864kb | C++17 | 606b | 2024-11-02 07:27:58 | 2024-11-02 07:27:59 |
Judging History
answer
#include <algorithm>
#include <iostream>
#include <vector>
using ld = long double;
using namespace std;
int main() {
int n, k;
ld x;
vector<ld> p(k + 1);
vector<ld> t(k + 1);
cin >> n >> k >> x;
cin >> p[0];
vector<ld> 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];
int ans = 0;
sort(s.begin(), s.end());
int pt = n - 1;
for (int i = 0; i <= k; i++) {
while (s[pt] * (p[i] - t[i]) >= x) {
pt--;
}
}
cout << n - (pt + 1) << endl;
}
详细
Test #1:
score: 100
Accepted
time: 0ms
memory: 3804kb
input:
4 3 10 4 1 5 2 1 3 4 5 7 9 10
output:
2
result:
ok single line: '2'
Test #2:
score: 0
Accepted
time: 0ms
memory: 3864kb
input:
1 3 10 3 1 2 3 4 5 8 10
output:
0
result:
ok single line: '0'
Test #3:
score: -100
Runtime Error
input:
100000 100000 544857367 2 45337851 26009328 15109007 11351428 108994261 7849241 17594424 49523907 45417024 54467076 60475979 54550753 30367925 22635509 272520858 49488818 90740887 32100499 21719978 20217697 22756760 32141867 23665455 90791528 30224242 21821163 23727178 13022129 30321908 21859760 341...