6623 | 2023-12-13 12:05:39 | Gervid | Highway's Speed Limits | cpp17 | Wrong answer 10/100 | 1.1s | 37728 KiB |
#include <iostream>
#include <vector>
#include <algorithm>
using namespace std;
int main()
{
int n, i, j, used = 0, out = 1;
cin >> n;
vector<int> a(n);
vector<int> b(n);
for (i = 0; i < n; i++)
{
cin >> a[i];
}
for (i = 0; i < n; i++)
{
cin >> b[i];
}
sort(a.begin(), a.end());
sort(b.begin(), b.end());
for (i = 0; i < n; i++)
{
j = used;
while (j < n && b[j] <= a[i])
{
j++;
}
out *= j - used;
used++;
}
cout << out;
}
Subtask | Sum | Test | Verdict | Time | Memory | ||
---|---|---|---|---|---|---|---|
subtask1 | 0/0 | ||||||
1 | Accepted | 3ms | 1816 KiB | ||||
2 | Accepted | 3ms | 2008 KiB | ||||
subtask2 | 10/10 | ||||||
3 | Accepted | 3ms | 2096 KiB | ||||
4 | Accepted | 3ms | 2224 KiB | ||||
5 | Accepted | 3ms | 2376 KiB | ||||
6 | Accepted | 3ms | 2544 KiB | ||||
7 | Accepted | 3ms | 2640 KiB | ||||
8 | Accepted | 3ms | 2752 KiB | ||||
subtask3 | 0/30 | ||||||
9 | Wrong answer | 3ms | 2644 KiB | ||||
10 | Wrong answer | 3ms | 2652 KiB | ||||
11 | Wrong answer | 3ms | 2764 KiB | ||||
12 | Wrong answer | 3ms | 3008 KiB | ||||
13 | Accepted | 3ms | 3148 KiB | ||||
14 | Accepted | 3ms | 3020 KiB | ||||
15 | Wrong answer | 3ms | 2940 KiB | ||||
16 | Wrong answer | 4ms | 3344 KiB | ||||
17 | Accepted | 3ms | 3212 KiB | ||||
subtask4 | 0/60 | ||||||
18 | Time limit exceeded | 1.1s | 4332 KiB | ||||
19 | Time limit exceeded | 1.049s | 4556 KiB | ||||
20 | Time limit exceeded | 1.049s | 5812 KiB | ||||
21 | Time limit exceeded | 1.062s | 6500 KiB | ||||
22 | Time limit exceeded | 1.069s | 6644 KiB | ||||
23 | Wrong answer | 275ms | 10704 KiB | ||||
24 | Wrong answer | 340ms | 13844 KiB | ||||
25 | Wrong answer | 595ms | 18532 KiB | ||||
26 | Wrong answer | 384ms | 20656 KiB | ||||
27 | Wrong answer | 621ms | 25412 KiB | ||||
28 | Wrong answer | 550ms | 28776 KiB | ||||
29 | Wrong answer | 247ms | 30236 KiB | ||||
30 | Wrong answer | 483ms | 34368 KiB | ||||
31 | Wrong answer | 462ms | 37728 KiB |