188972025-11-09 19:46:13szabelrNegáló rendezés (55 pont)cpp17Hibás válasz 3/55109ms5060 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()
{
    int n,x,r=1;
    cin >> n;
    map<int, int> key;
    for (int i = 0; i < n; i++) {
        cin >> x;
        key[x]++;
    }
    for (auto y : key) {
        //cout << y.second << " ";
        r =r*(y.second+1);
    }
    cout << (r / 2)%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
base3/55
1Elfogadva0/01ms316 KiB
2Hibás válasz0/061ms2100 KiB
3Hibás válasz0/21ms512 KiB
4Hibás válasz0/21ms316 KiB
5Hibás válasz0/21ms316 KiB
6Hibás válasz0/21ms316 KiB
7Elfogadva3/31ms316 KiB
8Hibás válasz0/21ms316 KiB
9Hibás válasz0/32ms332 KiB
10Hibás válasz0/381ms4560 KiB
11Hibás válasz0/3109ms5060 KiB
12Hibás válasz0/334ms396 KiB
13Hibás válasz0/332ms316 KiB
14Hibás válasz0/350ms1252 KiB
15Hibás válasz0/343ms472 KiB
16Hibás válasz0/367ms2068 KiB
17Hibás válasz0/365ms2184 KiB
18Hibás válasz0/348ms900 KiB
19Hibás válasz0/364ms2012 KiB
20Hibás válasz0/354ms1340 KiB
21Hibás válasz0/348ms844 KiB
22Hibás válasz0/339ms432 KiB