61812023-11-05 14:33:49MCDaveZsonglőrködéscpp17Runtime error 0/1003ms4964 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]++;
		end[temp2]++;
	}

	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
1Accepted3ms1816 KiB
2Accepted3ms2004 KiB
subtask20/20
3Runtime error3ms2344 KiB
4Runtime error3ms2632 KiB
5Runtime error3ms2584 KiB
6Runtime error3ms2708 KiB
7Runtime error3ms2656 KiB
8Runtime error3ms2908 KiB
9Runtime error3ms3180 KiB
10Runtime error3ms3464 KiB
11Runtime error3ms3564 KiB
subtask30/35
12Accepted3ms3996 KiB
13Wrong answer3ms3884 KiB
14Runtime error3ms4236 KiB
15Wrong answer3ms4384 KiB
16Wrong answer3ms4452 KiB
17Runtime error3ms4564 KiB
18Wrong answer3ms4224 KiB
19Runtime error3ms4444 KiB
20Runtime error3ms4468 KiB
subtask40/45
21Runtime error3ms4260 KiB
22Runtime error3ms4256 KiB
23Runtime error3ms4256 KiB
24Runtime error3ms4236 KiB
25Runtime error3ms4492 KiB
26Runtime error3ms4580 KiB
27Runtime error3ms4956 KiB
28Runtime error3ms4944 KiB
29Runtime error3ms4964 KiB