Rezultati

Up. imeNalogaJezikRezultatČas oddaje
finalsolution-2017 Akcija C 100/100OK 20. apr '17 @ 17:53

Test Točke Porabljen spomin Porabljen čas Status
#1 7/7 1,480 MiB 0,000 s OK
#2 7/7 1,395 MiB 0,000 s OK
#3 7/7 1,398 MiB 0,000 s OK
#4 7/7 1,391 MiB 0,005 s OK
#5 8/8 1,395 MiB 0,027 s OK
#6 8/8 1,395 MiB 0,021 s OK
#7 8/8 1,395 MiB 0,027 s OK
#8 8/8 1,391 MiB 0,027 s OK
#9 8/8 1,395 MiB 0,027 s OK
#10 8/8 1,395 MiB 0,027 s OK
#11 8/8 1,480 MiB 0,027 s OK
#12 8/8 1,477 MiB 0,027 s OK
#13 8/8 1,480 MiB 0,000 s OK

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

char M[12];

static int getoffset(void) {
    if (strcmp(M, "januar") == 0) return 0;
    if (strcmp(M, "februar") == 0) return 31;
    if (strcmp(M, "marec") == 0) return 59;
    if (strcmp(M, "april") == 0) return 90;
    if (strcmp(M, "maj") == 0) return 120;
    if (strcmp(M, "junij") == 0) return 151;
    if (strcmp(M, "julij") == 0) return 181;
    if (strcmp(M, "avgust") == 0) return 212;
    if (strcmp(M, "september") == 0) return 243;
    if (strcmp(M, "oktober") == 0) return 273;
    if (strcmp(M, "november") == 0) return 304;
    if (strcmp(M, "december") == 0) return 334;
    return 365;
}

int main() {
    int n = 0;
    scanf("%d", &n);
    while (n --> 0) {
        long long c = 0, d = 0, p = 0, pd = 0;
        scanf("%lld %lld.%lld %lld. %s %*d", &c, &p, &pd, &d, M);
        p = 100LL * p + pd;
        d += getoffset() - 109LL;
        if (d <= 0) printf("V SMETI\n");
        else {
            if (p * d < 100LL * c) printf("AKCIJA\n");
            else printf("OK\n");
        }
    }
    return 0;
}