QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#672830#2386. FishermenYarema#WA 0ms3592kbC++14825b2024-10-24 19:23:202024-10-24 19:23:21

Judging History

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

  • [2024-10-24 19:23:21]
  • 评测
  • 测评结果:WA
  • 用时:0ms
  • 内存:3592kb
  • [2024-10-24 19:23:20]
  • 提交

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'