Rezultati

Up. imeNalogaJezikRezultatČas oddaje
koklja-2017 Akcija C++ 100/100OK 20. apr '17 @ 17:50

Test Točke Porabljen spomin Porabljen čas Status
#1 7/7 3,133 MiB 0,004 s OK
#2 7/7 3,133 MiB 0,004 s OK
#3 7/7 3,125 MiB 0,004 s OK
#4 7/7 3,113 MiB 0,049 s OK
#5 8/8 3,133 MiB 0,426 s OK
#6 8/8 3,137 MiB 0,390 s OK
#7 8/8 3,125 MiB 0,414 s OK
#8 8/8 3,121 MiB 0,420 s OK
#9 8/8 3,125 MiB 0,401 s OK
#10 8/8 3,125 MiB 0,395 s OK
#11 8/8 3,133 MiB 0,402 s OK
#12 8/8 3,125 MiB 0,401 s OK
#13 8/8 3,133 MiB 0,004 s OK

Ocenjevani program (akcija.cpp):
#include <bits/stdc++.h>
 
using namespace std;
 
#define fi first
#define se second
#define MOD (1000 * 1000 * 1000 + 7)
#define maxn 3111
 
 
long long dan(long long d, string s)
{
    if (s == "januar")
        return d;
    else if ( s == "februar")
        return d+31;
    else if (s == "marec")
        return d+31+28;
    else if (s == "april")
        return d+31+28+31;
    else if (s == "maj")
        return d + 31+28+31+30;
    else if (s == "junij")
        return d +31+28+31+30+31;
    else if (s =="julij")
        return d + 31+28+31+30+31+30;
    else if (s =="avgust")
        return d +31+28+31+30+31+30+31;
    else if (s =="september")
        return d +31+28+31+30+31+30+31+31;
    else if (s == "oktober")
        return d +31+28+31+30+31+30+31+31+30;
    else if (s == "november")
        return d +31+28+31+30+31+30+31+31+30+31;
    else
        return d +31+28+31+30+31+30+31+31+30+31+30;
}

long long b, c;

void f(string s){
    int pos = s.find(".");
    string a = s.substr(0, pos);
    string d = s.substr(pos + 1, s.length() - pos - 1);
    stringstream ss, ll;
    ll << a;
    ll >> b;
    ss << d;
    ss >> c;
}
 
int main()
{
    long long t;
    cin>>t;
    for (long long i =0; i < t;i++)
    {
        long long a,day,year;
        string temp,s, fl;
        cin>>a>>fl>>day>>temp>>s>>year;
      //  cout << a << "  "<< fl << "  "<< day << "  "<< temp << "  " << s << " " <<year;
        f(fl);
        long long datum = dan(day,s);
        long long zero = dan(20, "april");
      //  cout<<datum<<" "<<zero<<endl;
        if (datum < zero)
            cout<<"V SMETI"<<endl;
        else if (a * 100 > (datum - zero + 1) * (b *100+c) )
            cout<<"AKCIJA"<<endl;
        else
            cout<<"OK"<<endl;
    } 
    return 0;
}