Rezultati

Up. imeNalogaJezikRezultatČas oddaje
TNT Akcija C++ 0/100Napaka med izvajanjem / ob izhodu (RTE) 20. apr '17 @ 20:21

Test Točke Porabljen spomin Porabljen čas Status
#1 0/7 3,172 MiB 0,004 s Klicana nedovoljena funkcija
Stderr:
terminate called after throwing an instance of 'std::invalid_argument'
  what():  stoi
#2 0/7 3,184 MiB 0,004 s Klicana nedovoljena funkcija
Stderr:
terminate called after throwing an instance of 'std::invalid_argument'
  what():  stoi
#3 0/7 3,188 MiB 0,004 s Klicana nedovoljena funkcija
Stderr:
terminate called after throwing an instance of 'std::invalid_argument'
  what():  stoi
#4 0/7 3,184 MiB 0,004 s Klicana nedovoljena funkcija
Stderr:
terminate called after throwing an instance of 'std::invalid_argument'
  what():  stoi
#5 0/8 3,184 MiB 0,010 s Klicana nedovoljena funkcija
Stderr:
terminate called after throwing an instance of 'std::invalid_argument'
  what():  stoi
#6 0/8 3,184 MiB 0,004 s Klicana nedovoljena funkcija
Stderr:
terminate called after throwing an instance of 'std::invalid_argument'
  what():  stoi
#7 0/8 3,188 MiB 0,004 s Klicana nedovoljena funkcija
Stderr:
terminate called after throwing an instance of 'std::invalid_argument'
  what():  stoi
#8 0/8 3,184 MiB 0,004 s Klicana nedovoljena funkcija
Stderr:
terminate called after throwing an instance of 'std::invalid_argument'
  what():  stoi
#9 0/8 3,188 MiB 0,004 s Klicana nedovoljena funkcija
Stderr:
terminate called after throwing an instance of 'std::invalid_argument'
  what():  stoi
#10 0/8 3,188 MiB 0,004 s Klicana nedovoljena funkcija
Stderr:
terminate called after throwing an instance of 'std::invalid_argument'
  what():  stoi
#11 0/8 3,180 MiB 0,004 s Klicana nedovoljena funkcija
Stderr:
terminate called after throwing an instance of 'std::invalid_argument'
  what():  stoi
#12 0/8 3,184 MiB 0,004 s Klicana nedovoljena funkcija
Stderr:
terminate called after throwing an instance of 'std::invalid_argument'
  what():  stoi
#13 0/8 3,184 MiB 0,004 s Klicana nedovoljena funkcija
Stderr:
terminate called after throwing an instance of 'std::invalid_argument'
  what():  stoi

Ocenjevani program (Hodnik.cpp):
//#include "stdafx.h"
#include <iostream>
#include <string>

using namespace std;

int main() {


		int N;
		cin >> N;
		for (int i = 0; i < N; i++)
		{
			int kolicina;
			cin >> kolicina;

			float povprecnaKolicina;
			cin >> povprecnaKolicina;


			string danS;
			cin >> danS;

			int dan = stoi(danS.substr(0, danS.find('.')));
			string temp;
			cin >> temp;

			if (temp == "april")
				dan += 10;
			else if (temp == "maj")
				dan += 41;
			else if (temp == "junij")
				dan += 71;
			else if (temp == "julij")
				dan += 102;
			else if (temp == "avgust")
				dan += 133;
			else if (temp == "september")
				dan += 163;
			else if (temp == "oktober")
				dan += 194;
			else if (temp == "november")
				dan += 224;
			else if (temp == "december")
				dan += 255;
			dan -= 30;

			if (dan < 0)
				cout << "V SMETI" << endl;

			else if (kolicina / povprecnaKolicina < dan)
				cout << "OK" << endl;

			else
				cout << "AKCIJA" << endl;

		}


	return 0;
}