193882025-12-07 19:06:41szabelrNegáló rendezés (55 pont)cpp17Hibás válasz 10/55108ms6480 KiB
// Negáló rendezés.cpp : This file contains the 'main' function. Program execution begins and ends there.
//

#include <iostream>
#include <map>
using namespace std;
int main()
{
    long long n,x,r=1,mini=1000007;
    cin >> n;
    map<long long, long long> key;
    for (int i = 0; i < n; i++) {     
        cin >> x;
        if (i == 0) {
            mini=min(mini,x);
        }
        key[x]++;
    }
    for (auto y : key) {
        //cout << y.second << " ";
        if(y.first!=mini)
            r =r*(y.second+1);
    }
    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
base10/55
1Elfogadva0/01ms316 KiB
2Hibás válasz0/064ms3172 KiB
3Elfogadva2/21ms508 KiB
4Elfogadva2/21ms316 KiB
5Elfogadva2/21ms352 KiB
6Elfogadva2/21ms388 KiB
7Hibás válasz0/31ms316 KiB
8Elfogadva2/21ms316 KiB
9Hibás válasz0/32ms316 KiB
10Hibás válasz0/378ms5940 KiB
11Hibás válasz0/3108ms6480 KiB
12Hibás válasz0/334ms396 KiB
13Hibás válasz0/332ms316 KiB
14Hibás válasz0/352ms1448 KiB
15Hibás válasz0/343ms624 KiB
16Hibás válasz0/364ms2868 KiB
17Hibás válasz0/364ms3124 KiB
18Hibás válasz0/348ms1076 KiB
19Hibás válasz0/364ms3124 KiB
20Hibás válasz0/354ms1584 KiB
21Hibás válasz0/346ms924 KiB
22Hibás válasz0/341ms432 KiB