QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#699237#6773. True Storyjkliao#RE 0ms3864kbC++17606b2024-11-02 07:27:582024-11-02 07:27:59

Judging History

你现在查看的是最新测评结果

  • [2024-11-02 07:27:59]
  • 评测
  • 测评结果:RE
  • 用时:0ms
  • 内存:3864kb
  • [2024-11-02 07:27:58]
  • 提交

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;
}

Details

Tip: Click on the bar to expand more detailed information

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...

output:


result: