66232023-12-13 12:05:39GervidHighway's Speed Limitscpp17Wrong answer 10/1001.1s37728 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;
}
SubtaskSumTestVerdictTimeMemory
subtask10/0
1Accepted3ms1816 KiB
2Accepted3ms2008 KiB
subtask210/10
3Accepted3ms2096 KiB
4Accepted3ms2224 KiB
5Accepted3ms2376 KiB
6Accepted3ms2544 KiB
7Accepted3ms2640 KiB
8Accepted3ms2752 KiB
subtask30/30
9Wrong answer3ms2644 KiB
10Wrong answer3ms2652 KiB
11Wrong answer3ms2764 KiB
12Wrong answer3ms3008 KiB
13Accepted3ms3148 KiB
14Accepted3ms3020 KiB
15Wrong answer3ms2940 KiB
16Wrong answer4ms3344 KiB
17Accepted3ms3212 KiB
subtask40/60
18Time limit exceeded1.1s4332 KiB
19Time limit exceeded1.049s4556 KiB
20Time limit exceeded1.049s5812 KiB
21Time limit exceeded1.062s6500 KiB
22Time limit exceeded1.069s6644 KiB
23Wrong answer275ms10704 KiB
24Wrong answer340ms13844 KiB
25Wrong answer595ms18532 KiB
26Wrong answer384ms20656 KiB
27Wrong answer621ms25412 KiB
28Wrong answer550ms28776 KiB
29Wrong answer247ms30236 KiB
30Wrong answer483ms34368 KiB
31Wrong answer462ms37728 KiB