40592023-03-12 16:05:31horvathabelNegáló rendezés (55 pont)cpp17Wrong answer 25/5579ms12668 KiB
#include <bits/stdc++.h>
using namespace std;

int main() {
	int n;
	cin>>n;
	map<int, int> m;
	int mn=10e9+1; 
	for (int i=0; i<n;i++){
		int x;
		cin>>x;
		m[x]++; 
		mn=min(x,mn);
	}
	int ans=1; 
	for (auto i:m){
		if (i.first!=mn) ans*=i.second+1;
		ans=ans%1000000007;
	}
	cout<<ans; 
}
SubtaskSumTestVerdictTimeMemory
base25/55
1Accepted0/03ms1808 KiB
2Wrong answer0/061ms5580 KiB
3Accepted2/23ms2212 KiB
4Accepted2/23ms2424 KiB
5Accepted2/23ms2512 KiB
6Accepted2/23ms2788 KiB
7Accepted3/32ms2796 KiB
8Accepted2/23ms2792 KiB
9Accepted3/33ms2916 KiB
10Accepted3/370ms11440 KiB
11Accepted3/379ms12668 KiB
12Accepted3/335ms3536 KiB
13Wrong answer0/334ms3472 KiB
14Wrong answer0/350ms5432 KiB
15Wrong answer0/343ms3860 KiB
16Wrong answer0/361ms7204 KiB
17Wrong answer0/359ms7804 KiB
18Wrong answer0/348ms4936 KiB
19Wrong answer0/361ms7356 KiB
20Wrong answer0/354ms6188 KiB
21Wrong answer0/346ms5272 KiB
22Wrong answer0/341ms4620 KiB