193922025-12-07 19:09:37szabelrNegáló rendezés (55 pont)cpp17Elfogadva 55/5552ms5076 KiB
// Negáló rendezés.cpp : This file contains the 'main' function. Program execution begins and ends there.
//

#include <iostream>
#include <unordered_map>
using namespace std;
int main()
{
    long long n,x,r=1,mini=1000007;
    cin >> n;
    unordered_map<long long, long long> key;
    for (int i = 0; i < n; i++) {     
        cin >> x;
        
        mini=min(mini,x);
        
        key[x]++;
    }
    for (auto y : key) {
        //cout << y.second << " ";
        if(y.first!=mini)
            r = (r * (y.second + 1)) % 1000000007;
    }
    cout << r%1000000007;
}

// Run program: Ctrl + F5 or Debug > Start Without Debugging menu
// Debug program: F5 or Debug > Start Debugging menu

// Tips for Getting Started: 
//   1. Use the Solution Explorer window to add/manage files
//   2. Use the Team Explorer window to connect to source control
//   3. Use the Output window to see build output and other messages
//   4. Use the Error List window to view errors
//   5. Go to Project > Add New Item to create new code files, or Project > Add Existing Item to add existing code files to the project
//   6. In the future, to open this project again, go to File > Open > Project and select the .sln file
RészfeladatÖsszpontTesztVerdiktIdőMemória
base55/55
1Elfogadva0/01ms500 KiB
2Elfogadva0/043ms1932 KiB
3Elfogadva2/21ms500 KiB
4Elfogadva2/21ms316 KiB
5Elfogadva2/21ms316 KiB
6Elfogadva2/21ms316 KiB
7Elfogadva3/31ms316 KiB
8Elfogadva2/21ms316 KiB
9Elfogadva3/32ms316 KiB
10Elfogadva3/346ms4932 KiB
11Elfogadva3/352ms5076 KiB
12Elfogadva3/332ms396 KiB
13Elfogadva3/330ms392 KiB
14Elfogadva3/339ms1096 KiB
15Elfogadva3/335ms500 KiB
16Elfogadva3/343ms1932 KiB
17Elfogadva3/343ms2500 KiB
18Elfogadva3/337ms832 KiB
19Elfogadva3/343ms1680 KiB
20Elfogadva3/341ms1536 KiB
21Elfogadva3/334ms564 KiB
22Elfogadva3/335ms508 KiB