77792024-01-11 09:51:02almadavBürokrácia (40)cpp17Wrong answer 0/4037ms14320 KiB
#include <bits/stdc++.h>

using namespace std;

int main()
{
    iostream::sync_with_stdio(0);
    cin.tie(0);
    int n;
    string be;
    cin >> n;
    int q;
    vector<bool>torvenyek(n,true);
    vector<vector<int>> mitmik(n);
    for(int i = 0; i < n; i++)
    {
        cin >> be;
        if(be == "V")
        {
            cin >> q;
            mitmik[q-1].push_back(i);
        }

    }
    for(int i = n-1; i >=0;i--)
    {
        for(auto x : mitmik[i])
        {
            if(torvenyek[x])
            {
                torvenyek[i] = false;
                break;
            }
        }
    }
    bool alma = true;
    int c =0;
    for(auto x : torvenyek)
    {
        c++;
        if(x)
        {
            if(!alma)cout <<" ";
            alma = false;
            cout << c;
        }
    }

}
SubtaskSumTestVerdictTimeMemory
base0/40
1Wrong answer0/03ms1828 KiB
2Wrong answer0/13ms2048 KiB
3Wrong answer0/13ms2144 KiB
4Wrong answer0/13ms2400 KiB
5Wrong answer0/120ms7084 KiB
6Wrong answer0/135ms13588 KiB
7Wrong answer0/135ms13300 KiB
8Wrong answer0/235ms11936 KiB
9Wrong answer0/237ms11260 KiB
10Wrong answer0/237ms11368 KiB
11Wrong answer0/237ms10780 KiB
12Wrong answer0/221ms8456 KiB
13Wrong answer0/223ms8412 KiB
14Wrong answer0/235ms10984 KiB
15Wrong answer0/230ms9940 KiB
16Wrong answer0/221ms8536 KiB
17Wrong answer0/221ms8704 KiB
18Wrong answer0/223ms8584 KiB
19Wrong answer0/219ms8048 KiB
20Wrong answer0/219ms8064 KiB
21Wrong answer0/220ms8140 KiB
22Wrong answer0/235ms14320 KiB
23Wrong answer0/437ms12136 KiB