QOJ.ac
QOJ
ID | 题目 | 提交者 | 结果 | 用时 | 内存 | 语言 | 文件大小 | 提交时间 | 测评时间 |
---|---|---|---|---|---|---|---|---|---|
#672830 | #2386. Fishermen | Yarema# | WA | 0ms | 3592kb | C++14 | 825b | 2024-10-24 19:23:20 | 2024-10-24 19:23:21 |
Judging History
answer
#include <bits/stdc++.h>
using namespace std;
#define FOR(i, a, b) for(int i = (a); i < (b); i++)
#define RFOR(i, a, b) for(int i = (a) - 1; i >= (b); i--)
#define SZ(a) int(a.size())
#define ALL(a) a.begin(), a.end()
#define PB push_back
#define MP make_pair
#define F first
#define S second
typedef long long LL;
typedef vector<int> VI;
typedef vector<LL> VL;
typedef pair<int, int> PII;
typedef pair<LL, LL> PLL;
typedef double db;
int main()
{
ios::sync_with_stdio(0);
cin.tie(0);
int n, m, l;
cin >> n >> m >> l;
vector<PII> f(n);
FOR (i, 0, n)
cin >> f[i].F >> f[i].S;
FOR (i, 0, m)
{
int x;
cin >> x;
int ans = 0;
FOR (j, 0, n)
if (abs(x - f[j].F) + f[j].S <= l)
ans++;
if (i)
cout << ' ';
cout << ans;
}
cout << '\n';
return 0;
}
詳細信息
Test #1:
score: 0
Wrong Answer
time: 0ms
memory: 3592kb
input:
8 4 4 7 2 3 3 4 5 5 1 2 2 1 4 8 4 9 4 6 1 4 9
output:
2 2 3 2
result:
wrong answer 1st lines differ - expected: '2', found: '2 2 3 2'