77762024-01-11 09:41:30almadavBürokrácia (40)cpp17Wrong answer 0/4037ms14688 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;
            }
        }
    }
    int c =0;
    for(auto x : torvenyek)
    {
        c++;
        if(x)
        {
            cout << c << " ";
        }
    }
}
SubtaskSumTestVerdictTimeMemory
base0/40
1Wrong answer0/03ms1828 KiB
2Wrong answer0/13ms2056 KiB
3Wrong answer0/13ms2244 KiB
4Wrong answer0/13ms2640 KiB
5Wrong answer0/120ms7164 KiB
6Wrong answer0/135ms13876 KiB
7Wrong answer0/135ms13432 KiB
8Wrong answer0/235ms12100 KiB
9Wrong answer0/237ms11788 KiB
10Wrong answer0/237ms11940 KiB
11Wrong answer0/237ms11340 KiB
12Wrong answer0/221ms8936 KiB
13Wrong answer0/221ms8916 KiB
14Wrong answer0/235ms11468 KiB
15Wrong answer0/230ms10460 KiB
16Wrong answer0/223ms9244 KiB
17Wrong answer0/221ms9136 KiB
18Wrong answer0/223ms9120 KiB
19Wrong answer0/219ms8608 KiB
20Wrong answer0/220ms8504 KiB
21Wrong answer0/220ms8484 KiB
22Wrong answer0/235ms14688 KiB
23Wrong answer0/437ms12612 KiB