188952025-11-09 19:44:16szabelrNegáló rendezés (55 pont)cpp17Wrong answer 0/5592ms5168 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;
}

// 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
SubtaskSumTestVerdictTimeMemory
base0/55
1Wrong answer0/01ms316 KiB
2Wrong answer0/067ms2100 KiB
3Wrong answer0/21ms500 KiB
4Wrong answer0/21ms316 KiB
5Wrong answer0/21ms316 KiB
6Wrong answer0/21ms316 KiB
7Wrong answer0/31ms316 KiB
8Wrong answer0/21ms316 KiB
9Wrong answer0/32ms316 KiB
10Wrong answer0/389ms4660 KiB
11Wrong answer0/392ms5168 KiB
12Wrong answer0/335ms400 KiB
13Wrong answer0/334ms316 KiB
14Wrong answer0/354ms1316 KiB
15Wrong answer0/345ms316 KiB
16Wrong answer0/367ms2140 KiB
17Wrong answer0/364ms2344 KiB
18Wrong answer0/350ms820 KiB
19Wrong answer0/365ms2100 KiB
20Wrong answer0/356ms1328 KiB
21Wrong answer0/348ms724 KiB
22Wrong answer0/343ms432 KiB