61792023-11-05 14:28:31MCDaveZsonglőrködéscpp17Runtime error 0/1003ms4372 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 < 23; i++)
	{
		if (begin[i]<=end[i])
		{
			days -= begin[i];
		}
		else
		{
			days -= end[i];
		}
	}

	cout << days;
}
SubtaskSumTestVerdictTimeMemory
subtask10/0
1Accepted3ms1812 KiB
2Accepted3ms2056 KiB
subtask20/20
3Runtime error3ms2320 KiB
4Runtime error3ms2580 KiB
5Runtime error3ms2552 KiB
6Runtime error3ms2764 KiB
7Runtime error3ms3040 KiB
8Runtime error3ms2928 KiB
9Runtime error3ms2928 KiB
10Runtime error3ms3228 KiB
11Runtime error3ms3248 KiB
subtask30/35
12Accepted3ms3440 KiB
13Wrong answer3ms3628 KiB
14Wrong answer3ms3628 KiB
15Wrong answer3ms3600 KiB
16Wrong answer3ms3780 KiB
17Runtime error3ms3868 KiB
18Wrong answer3ms4172 KiB
19Runtime error3ms4272 KiB
20Runtime error3ms4084 KiB
subtask40/45
21Runtime error3ms4348 KiB
22Runtime error3ms4096 KiB
23Runtime error3ms4100 KiB
24Runtime error3ms4120 KiB
25Runtime error3ms4116 KiB
26Runtime error3ms4148 KiB
27Runtime error3ms4372 KiB
28Runtime error3ms4332 KiB
29Runtime error3ms4352 KiB