Rezultati

Up. imeNalogaJezikRezultatČas oddaje
the-org-2019 Malica C++ 100/100OK 09. maj '19 @ 17:01

Test Točke Porabljen spomin Porabljen čas Status
#1 [več] 16/16 3,020 MiB 0,004 s OK
#2 [več] 16/16 3,039 MiB 0,000 s OK
#3 [več] 17/17 3,246 MiB 0,001 s OK
#4 [več] 17/17 3,238 MiB 0,001 s OK
#5 [več] 17/17 3,039 MiB 0,000 s OK
#6 [več] 17/17 3,246 MiB 0,013 s OK

Ocenjevani program (main.cpp):
#include <bits/stdc++.h>

#define f first
#define s second
#define mp make_pair
#define pb push_back

using namespace std;

typedef long long ll;
typedef pair<int, int> pii;

const int maxn = 2e5 + 17;

int res[1005][3];

int N, M;
int n1, n2;
string tmp;
char in[maxn];
int main()
{
    ios_base::sync_with_stdio(false);
    cin >> N >> M;
    for(int i=0;i<N;i++){
        cin >> n1 >> n2; getline(cin, tmp);

        for (int j = 0; j < n1; j++) {
            cin >> tmp;
            int idx = 2;
            if(tmp == "sirov") idx = 0;
            if(tmp == "veganski") idx = 1;
            res[n2-1][idx]++;
            getline(cin, tmp);
        }
    }
    for(int i=0;i<M;i++){
        for(int j=0;j<3;j++) cout<<res[i][j]<<" "; 
    cout << endl;
    }

    return 0;
}