40612023-03-12 16:07:05horvathabelNegáló rendezés (55 pont)cpp17Accepted 55/5589ms15816 KiB
#include <bits/stdc++.h>
using namespace std;
using ll=long long;
int main() {
	int n;
	cin>>n;
	map<ll, ll> m;
	int mn=10e9+1; 
	for (int i=0; i<n;i++){
		int x;
		cin>>x;
		m[x]++; 
		mn=min(x,mn);
	}
	ll ans=1; 
	for (auto i:m){
		if (i.first!=mn) ans*=i.second+1;
		ans=ans%1000000007;
	}
	cout<<ans; 
}
SubtaskSumTestVerdictTimeMemory
base55/55
1Accepted0/03ms1812 KiB
2Accepted0/061ms6808 KiB
3Accepted2/23ms2212 KiB
4Accepted2/23ms2296 KiB
5Accepted2/23ms2680 KiB
6Accepted2/23ms2652 KiB
7Accepted3/33ms2888 KiB
8Accepted2/23ms3028 KiB
9Accepted3/33ms3444 KiB
10Accepted3/371ms14636 KiB
11Accepted3/389ms15816 KiB
12Accepted3/335ms3484 KiB
13Accepted3/332ms3844 KiB
14Accepted3/352ms6340 KiB
15Accepted3/343ms4184 KiB
16Accepted3/364ms8612 KiB
17Accepted3/361ms9420 KiB
18Accepted3/350ms5496 KiB
19Accepted3/361ms8524 KiB
20Accepted3/354ms6848 KiB
21Accepted3/346ms5468 KiB
22Accepted3/341ms4372 KiB