Rezultati

Up. imeNalogaJezikRezultatČas oddaje
final-solution-2019 Malica C 100/100OK 09. maj '19 @ 16:23

Test Točke Porabljen spomin Porabljen čas Status
#1 [več] 16/16 1,473 MiB 0,000 s OK
#2 [več] 16/16 1,496 MiB 0,003 s OK
#3 [več] 17/17 1,465 MiB 0,005 s OK
#4 [več] 17/17 1,496 MiB 0,000 s OK
#5 [več] 17/17 1,469 MiB 0,005 s OK
#6 [več] 17/17 1,492 MiB 0,003 s OK

Ocenjevani program (malica.c):
#include <stdio.h>
#include <string.h>

static int NS[1024];
static int NV[1024];
static int NO[1024];
static char B[1024];

int main() {
    int i = 0, n = 0, u = 0;
    scanf("%d %d ", &n, &u);
    while (n --> 0) {
        int t = 0, r = 0;
        scanf("%d %d ", &t, &r);
        gets(B);
        while (t --> 0) {
            gets(B);
            strtok(B, " ");
            if (!strcmp(B, "sirov")) NS[r-1]++;
            else if (!strcmp(B, "veganski")) NV[r-1]++;
            else NO[r-1]++;
        }
    }
    for (; i < u; i++) printf("%d %d %d\n", NS[i], NV[i], NO[i]);
    return 0;
}