Submission #19245827


Source Code Expand

Copy
#include <iostream>
#include <vector>

int main() {
	int N, M;
	std::cin >> N >> M;
	std::vector<int> a(N), b(N), c(N), w(N);
	for (int i = 0; i < N; i++)std::cin >> a[i] >> b[i] >> c[i] >> w[i];
	std::vector<int> x(M), y(M), z(M);
	for (int i = 0; i < M; i++)std::cin >> x[i] >> y[i] >> z[i];

	for (int i = 0; i < M; i++)
	{
		int max = 0;
		for (int j = 0; j < N; j++)
			if (x[i] >= a[j] && y[i] >= b[j] && z[i] >= c[j])
				max = std::max(max, w[j]);

		std::cout << max << std::endl;
	}

	return 0;
}

Submission Info

Submission Time
Task C - Optimal Recommendations
User h0geh0ge
Language C++ (GCC 9.2.1)
Score 0
Code Size 528 Byte
Status TLE
Exec Time 2205 ms
Memory 4780 KB

Judge Result

Set Name All
Score / Max Score 0 / 100
Status
AC × 10
TLE × 14
Set Name Test Cases
All 10-random-00.txt, 10-random-01.txt, 10-random-02.txt, 10-random-03.txt, 10-random-04.txt, 20-absW-00.txt, 20-absW-01.txt, 20-absW-02.txt, 20-absW-03.txt, 20-absW-04.txt, 30-balance-00.txt, 30-balance-01.txt, 30-balance-02.txt, 30-balance-03.txt, 30-balance-04.txt, 40-limit_dim-00.txt, 40-limit_dim-01.txt, 40-limit_dim-02.txt, 40-limit_dim-03.txt, 40-limit_dim-04.txt, 40-limit_dim-05.txt, 40-limit_dim-06.txt, Corner1.txt, Sample1.txt
Case Name Status Exec Time Memory
10-random-00.txt TLE 2205 ms 4536 KB
10-random-01.txt AC 7 ms 3516 KB
10-random-02.txt AC 513 ms 3704 KB
10-random-03.txt TLE 2205 ms 4016 KB
10-random-04.txt AC 979 ms 3952 KB
20-absW-00.txt TLE 2205 ms 4612 KB
20-absW-01.txt AC 6 ms 3488 KB
20-absW-02.txt TLE 2205 ms 4160 KB
20-absW-03.txt TLE 2205 ms 4172 KB
20-absW-04.txt AC 844 ms 3956 KB
30-balance-00.txt TLE 2205 ms 4608 KB
30-balance-01.txt AC 7 ms 3592 KB
30-balance-02.txt AC 284 ms 3804 KB
30-balance-03.txt TLE 2205 ms 4236 KB
30-balance-04.txt AC 1260 ms 3748 KB
40-limit_dim-00.txt TLE 2205 ms 4584 KB
40-limit_dim-01.txt TLE 2205 ms 4540 KB
40-limit_dim-02.txt TLE 2205 ms 4636 KB
40-limit_dim-03.txt TLE 2205 ms 4780 KB
40-limit_dim-04.txt TLE 2205 ms 4612 KB
40-limit_dim-05.txt TLE 2205 ms 4676 KB
40-limit_dim-06.txt TLE 2205 ms 4612 KB
Corner1.txt AC 9 ms 3616 KB
Sample1.txt AC 2 ms 3512 KB