66212023-12-13 07:06:29NeMNegáló rendezés (55 pont)cpp17Wrong answer 0/5535ms4232 KiB
#include <bits/stdc++.h>
using namespace std;

int main() {
	int n;
	cin >> n;
	vector <int> a (n, 0);
	for (int i = 0; i < n; i++) {
		int temp;
		cin >> temp;

		a[temp]++;
	}

	long long counter = 1;
	for (int i = 0; i < a.size(); i++) {
		counter = counter * (a[i] + 1);
	}
	if (n % 2) {
		counter--;
	}

	cout << counter % 1000000007;
	return 0;
}
SubtaskSumTestVerdictTimeMemory
base0/55
1Wrong answer0/03ms1808 KiB
2Wrong answer0/035ms2764 KiB
3Wrong answer0/23ms2288 KiB
4Runtime error0/23ms2292 KiB
5Runtime error0/23ms2560 KiB
6Runtime error0/23ms2780 KiB
7Runtime error0/33ms2868 KiB
8Runtime error0/23ms2828 KiB
9Runtime error0/33ms2788 KiB
10Runtime error0/33ms3548 KiB
11Wrong answer0/335ms3724 KiB
12Wrong answer0/335ms3692 KiB
13Wrong answer0/332ms3892 KiB
14Wrong answer0/335ms4112 KiB
15Wrong answer0/335ms3968 KiB
16Wrong answer0/335ms3964 KiB
17Runtime error0/33ms4128 KiB
18Wrong answer0/335ms4072 KiB
19Wrong answer0/335ms3964 KiB
20Runtime error0/33ms4004 KiB
21Runtime error0/33ms4232 KiB
22Wrong answer0/335ms4180 KiB