61802023-11-05 14:30:27MCDaveZsonglőrködéscpp17Runtime error 0/1003ms4960 KiB
#include <iostream>
#include <vector>
#include <algorithm>

using namespace std;

int main()
{
	int n;
	cin >> n;

	vector<int> begin(24, 0);
	vector<int> end(24, 0);

	for (int i = 0; i < n; i++)
	{
		int temp1 = 0, temp2 = 0;
		cin >> temp1 >> temp2;
		begin[temp1-1]++;
		end[temp2-1]++;
	}

	int days = n, temp2 = 0;

	for (int i = 0; i < 24; i++)
	{
		if (begin[i]<=end[i])
		{
			days -= begin[i];
		}
		else
		{
			days -= end[i];
		}
	}

	cout << days;
}
SubtaskSumTestVerdictTimeMemory
subtask10/0
1Accepted3ms2088 KiB
2Accepted3ms2140 KiB
subtask20/20
3Runtime error3ms2492 KiB
4Runtime error3ms2764 KiB
5Runtime error3ms2984 KiB
6Runtime error3ms3144 KiB
7Runtime error3ms3340 KiB
8Runtime error3ms3172 KiB
9Runtime error3ms3084 KiB
10Runtime error3ms3336 KiB
11Runtime error3ms3292 KiB
subtask30/35
12Accepted3ms3460 KiB
13Wrong answer3ms3560 KiB
14Wrong answer2ms3568 KiB
15Wrong answer3ms3800 KiB
16Wrong answer3ms3776 KiB
17Runtime error3ms4056 KiB
18Wrong answer3ms3956 KiB
19Runtime error3ms4192 KiB
20Runtime error3ms4276 KiB
subtask40/45
21Runtime error3ms4392 KiB
22Runtime error3ms4632 KiB
23Runtime error3ms4644 KiB
24Runtime error3ms4812 KiB
25Runtime error3ms4804 KiB
26Runtime error3ms4916 KiB
27Runtime error3ms4664 KiB
28Runtime error3ms4944 KiB
29Runtime error3ms4960 KiB