QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#699241#6773. True Storyjkliao#RE 0ms0kbC++17608b2024-11-02 07:37:102024-11-02 07:37:11

Judging History

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

  • [2024-11-02 07:37:11]
  • 评测
  • 测评结果:RE
  • 用时:0ms
  • 内存:0kb
  • [2024-11-02 07:37:10]
  • 提交

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

result: