6181 | 2023-11-05 14:33:49 | MCDave | Zsonglőrködés | cpp17 | Runtime error 0/100 | 3ms | 4964 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;
}
Subtask | Sum | Test | Verdict | Time | Memory | ||
---|---|---|---|---|---|---|---|
subtask1 | 0/0 | ||||||
1 | Accepted | 3ms | 1816 KiB | ||||
2 | Accepted | 3ms | 2004 KiB | ||||
subtask2 | 0/20 | ||||||
3 | Runtime error | 3ms | 2344 KiB | ||||
4 | Runtime error | 3ms | 2632 KiB | ||||
5 | Runtime error | 3ms | 2584 KiB | ||||
6 | Runtime error | 3ms | 2708 KiB | ||||
7 | Runtime error | 3ms | 2656 KiB | ||||
8 | Runtime error | 3ms | 2908 KiB | ||||
9 | Runtime error | 3ms | 3180 KiB | ||||
10 | Runtime error | 3ms | 3464 KiB | ||||
11 | Runtime error | 3ms | 3564 KiB | ||||
subtask3 | 0/35 | ||||||
12 | Accepted | 3ms | 3996 KiB | ||||
13 | Wrong answer | 3ms | 3884 KiB | ||||
14 | Runtime error | 3ms | 4236 KiB | ||||
15 | Wrong answer | 3ms | 4384 KiB | ||||
16 | Wrong answer | 3ms | 4452 KiB | ||||
17 | Runtime error | 3ms | 4564 KiB | ||||
18 | Wrong answer | 3ms | 4224 KiB | ||||
19 | Runtime error | 3ms | 4444 KiB | ||||
20 | Runtime error | 3ms | 4468 KiB | ||||
subtask4 | 0/45 | ||||||
21 | Runtime error | 3ms | 4260 KiB | ||||
22 | Runtime error | 3ms | 4256 KiB | ||||
23 | Runtime error | 3ms | 4256 KiB | ||||
24 | Runtime error | 3ms | 4236 KiB | ||||
25 | Runtime error | 3ms | 4492 KiB | ||||
26 | Runtime error | 3ms | 4580 KiB | ||||
27 | Runtime error | 3ms | 4956 KiB | ||||
28 | Runtime error | 3ms | 4944 KiB | ||||
29 | Runtime error | 3ms | 4964 KiB |