Rezultati

Up. imeNalogaJezikRezultatČas oddaje
vmk-2019 Malica C++ 100/100OK 09. maj '19 @ 16:41

Test Točke Porabljen spomin Porabljen čas Status
#1 [več] 16/16 6,898 MiB 0,009 s OK
#2 [več] 16/16 6,906 MiB 0,029 s OK
#3 [več] 17/17 7,055 MiB 0,006 s OK
#4 [več] 17/17 6,902 MiB 0,000 s OK
#5 [več] 17/17 7,055 MiB 0,000 s OK
#6 [več] 17/17 7,047 MiB 0,035 s OK

Ocenjevani program (Malica.cpp):
#include <iostream>
#include <string>
#include <vector>

using namespace std;
vector<vector<int>> uci(1001, vector<int>(1001));

int main() {
	int N, U, clani, ucilnica;
	string sendwich, ekipa;
	cin >> N >> U;
	/*uci.resize(U + 1);
	for (int i = 1; i <= U; i++) {
		uci[i].resize(3);
	}*/
	while (N--) {
		cin >> clani >> ucilnica;
		getline(cin, ekipa);
		while (clani--) {
			cin >> sendwich;
			if (sendwich == "sirov") {
				uci[ucilnica][0]++;
			}
			else if (sendwich == "veganski") {
				uci[ucilnica][1]++;
			}
			else {
				uci[ucilnica][2]++;
			}
			getline(cin, ekipa);
		}
	}
	for (int i = 1; i <= U; i++) {
		cout << uci[i][0] << " " << uci[i][1] << " " << uci[i][2] << endl;
	}
	//system("pause");
	return 0;
}