QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#545336#8780. Training, Round 2kmiaoCompile Error//C++20613b2024-09-03 10:11:122024-09-03 10:11:13

Judging History

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

  • [2024-09-03 10:11:13]
  • 评测
  • [2024-09-03 10:11:12]
  • 提交

answer

#include <bits/stdc++.h>
using namespace std;

const int maxN = 5005;
bool vis[maxN][maxN];

int main() {
	cin.tie(0)->sync_with_stdio(0);
	int n;
	ll x, y;
	cin >> n >> x >> y;
	int mx = 0;
	vis[0][0] = true;
	for (int i = 0; i < n; i++) {
		ll l, r, l1, r1;
		cin >> l >> r >> l1 >> r1;
		l -= x;
		r -= x;
		l1 -= y;
		r1 -= y;
		bool ok = false;
		for (int j = 0; j <= mx; j++) {
			int k = mx - j;
			if (l <= j && j <= r && l1 <= k && k <= r1) {
				ok = true;
				vis[j + 1][k] = true;
				vis[j][k + 1] = true;
			}
		}
		if (ok) mx++;
	}
	cout << mx << '\n';
	return 0;
}

Details

answer.code: In function ‘int main()’:
answer.code:10:9: error: ‘ll’ was not declared in this scope
   10 |         ll x, y;
      |         ^~
answer.code:11:21: error: ‘x’ was not declared in this scope
   11 |         cin >> n >> x >> y;
      |                     ^
answer.code:11:26: error: ‘y’ was not declared in this scope
   11 |         cin >> n >> x >> y;
      |                          ^
answer.code:15:19: error: expected ‘;’ before ‘l’
   15 |                 ll l, r, l1, r1;
      |                   ^~
      |                   ;
answer.code:16:24: error: ‘l’ was not declared in this scope
   16 |                 cin >> l >> r >> l1 >> r1;
      |                        ^
answer.code:16:29: error: ‘r’ was not declared in this scope
   16 |                 cin >> l >> r >> l1 >> r1;
      |                             ^
answer.code:16:34: error: ‘l1’ was not declared in this scope; did you mean ‘y1’?
   16 |                 cin >> l >> r >> l1 >> r1;
      |                                  ^~
      |                                  y1
answer.code:16:40: error: ‘r1’ was not declared in this scope; did you mean ‘y1’?
   16 |                 cin >> l >> r >> l1 >> r1;
      |                                        ^~
      |                                        y1