Submission #217121

# Submission time Handle Problem Language Result Execution time Memory
217121 2020-03-29T05:27:34 Z maruii Hamburg Steak (JOI20_hamburg) C++14
0 / 100
3 ms 640 KB
#include <bits/stdc++.h>
using namespace std;
using pii = pair<int, int>;
#define ff first
#define ss second
#define eack emplace_back

vector<pii> solve(vector<pair<pii, pii>> &v, int k) {
	if (v.empty()) return {pii(1, 1)};
	int xr = 0, xl = 1e9, yr = 0, yl = 1e9;
	for (auto i : v) {
		xl = min(xl, i.ss.ff);
		yl = min(yl, i.ss.ss);
		xr = max(xr, i.ff.ff);
		yr = max(xr, i.ff.ss);
	}
	if (k == 1) {
		if (xl < xr || yl < yr) return {pii(0, 0)};
		return {pii(xl, yl)};
	}
	assert(0);
	if (k == 2) {

	}
	if (k == 3) {

	}
	if (k == 4) {

	}
}
int main() {
	ios_base::sync_with_stdio(0), cin.tie(0);
	int N, K; cin >> N >> K;
	vector<pair<pii, pii>> v;
	for (int i = 0; i < N; ++i) {
		int a, b, c, d; cin >> a >> b >> c >> d;
		v.eack(pii(a, b), pii(c, d));
	}
	auto ans = solve(v, K);
	for (auto i : ans) cout << i.ff << ' ' << i.ss << '\n';
	return 0;
}
# Verdict Execution time Memory Grader output
1 Incorrect 1 ms 384 KB Integer parameter [name=x_1] equals to 0, violates the range [1, 10^9]
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Runtime error 2 ms 640 KB Execution killed with signal 11 (could be triggered by violating memory limits)
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Runtime error 3 ms 640 KB Execution killed with signal 11 (could be triggered by violating memory limits)
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Runtime error 2 ms 640 KB Execution killed with signal 11 (could be triggered by violating memory limits)
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 1 ms 384 KB Integer parameter [name=x_1] equals to 0, violates the range [1, 10^9]
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Runtime error 2 ms 640 KB Execution killed with signal 11 (could be triggered by violating memory limits)
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Runtime error 3 ms 640 KB Execution killed with signal 11 (could be triggered by violating memory limits)
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Runtime error 2 ms 640 KB Execution killed with signal 11 (could be triggered by violating memory limits)
2 Halted 0 ms 0 KB -