Submission #480967

# Submission time Handle Problem Language Result Execution time Memory
480967 2021-10-19T03:10:38 Z rk42745417 Trampoline (info1cup20_trampoline) C++17
11 / 100
2000 ms 14404 KB
#include <bits/stdc++.h>
using namespace std;

#define EmiliaMyWife ios::sync_with_stdio(0); cin.tie(0);
using ll = int64_t;
using uint = uint32_t;
using ull = uint64_t;
using ld = long double;
const int INF = 0x3f3f3f3f;
const int MOD = 1e9 + 7;
const double EPS = 1e-8;
const ll LINF = ll(1e18) + ll(1e15);
static auto LamyIsCute = []() {
	EmiliaMyWife
	return 48763;
}();

signed main() {
	int r, c, n;
	cin >> r >> c >> n;
	vector<pair<int, int>> arr(n);
	for(int i = 0; i < n; i++)
		cin >> arr[i].first >> arr[i].second;
	sort(arr.begin(), arr.end());
	int q;
	cin >> q;
	auto query = [&]() {
		int x1, y1, x2, y2;
		cin >> x1 >> y1 >> x2 >> y2;
		while(x1 < x2) {
			auto l = lower_bound(arr.begin(), arr.end(), make_pair(x1, y1));
			if(l == arr.end() || l->first != x1 || l->second > y2)
				return false;
			x1++;
			y1 = l->second;
		}
		return true;
	};
	while(q--) {
		cout << (query() ? "Yes" : "No") << '\n';
	}
}
# Verdict Execution time Memory Grader output
1 Incorrect 4 ms 332 KB expected NO, found YES [13th token]
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Correct 72 ms 3668 KB 4000 token(s): yes count is 99, no count is 3901
2 Correct 80 ms 3780 KB 4000 token(s): yes count is 91, no count is 3909
3 Correct 209 ms 3424 KB 4000 token(s): yes count is 4000, no count is 0
4 Incorrect 240 ms 3776 KB expected NO, found YES [1000th token]
# Verdict Execution time Memory Grader output
1 Correct 197 ms 14404 KB 200000 token(s): yes count is 110486, no count is 89514
2 Correct 202 ms 14368 KB 200000 token(s): yes count is 114664, no count is 85336
3 Correct 201 ms 14184 KB 200000 token(s): yes count is 86232, no count is 113768
4 Correct 203 ms 14272 KB 200000 token(s): yes count is 94603, no count is 105397
5 Correct 214 ms 14248 KB 200000 token(s): yes count is 94148, no count is 105852
6 Correct 211 ms 14112 KB 200000 token(s): yes count is 97163, no count is 102837
# Verdict Execution time Memory Grader output
1 Incorrect 6 ms 588 KB expected NO, found YES [9th token]
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Execution timed out 2093 ms 6084 KB Time limit exceeded
2 Halted 0 ms 0 KB -