Submission #863914

# Submission time Handle Problem Language Result Execution time Memory
863914 2023-10-21T12:34:17 Z aaron_dcoder Mensza (COI22_mensza) C++17
11 / 100
5000 ms 264844 KB
#undef NDEBUG

#ifdef NDEBUG
#define dbg(TXTMSG) if constexpr (false) cerr << "lol"
#define dbgv(VARN) ((void)0)
#define dbgfor(COND) if constexpr (false) for (COND)

#else
#define _GLIBCXX_DEBUG 1
#define _GLIBCXX_DEBUG_PEDANTIC 1
#pragma GCC optimize("trapv")
#define dbg(TXTMSG) cerr << "\n" << TXTMSG
#define dbgv(VARN) cerr << "\n" << #VARN << " = "<< VARN << ", line: " << __LINE__ << "\n"
#define dbgfor(COND) for (COND)

#endif

#include <bits/stdc++.h>
using namespace std;
using ll = long long; 
using pll = pair<ll,ll>;
#define e0 first
#define e1 second
constexpr ll INFTY = 1e11;

int main() {
	ll L,Q;
	cin >> L >> Q;
	for (ll tc = 0; tc < Q; ++tc)
	{
		constexpr ll period = 1;

		string p;
		cin >> p;

		if (p=="alojzije") {
			ll A;
			cin >> A;

			vector<ll> outp;
			for (ll i = 0; i < (A/period); ++i)
			{
				outp.push_back(i);
			}

			for (ll i = 0; i < 4; ++i)
			{
				outp.push_back(A/period);
			}

			cout << outp.size() << " ";
			for (ll e : outp) {
				cout << e << " ";
			}
			cout << "\n";
		}
		else if (p=="benjamin") {
			ll B;
			cin >> B;

			vector<ll> outp;
			outp.push_back(B/period);

			cout << outp.size() << " ";
			for (ll e : outp) {
				cout << e << " ";
			}
			cout << "\n";
		}
		else if(p=="cecilija")
		{
			ll lc;
			cin >> lc;
			set<ll> C;

			for (ll i = 0; i < lc; ++i)
			{
				ll ci;
				cin >> ci;
				C.insert(ci);
			}

			if (C.count(5)==0) {
				if (C.count(2)==1) {
					cout << "A\n";
				}
				else {
					assert(C.count(2)==0);
					cout << "B\n";
				}
			}

			else {
				throw exception();
			}


		}
		else {dbgv(p);throw "help";};

	}
}
# Verdict Execution time Memory Grader output
1 Correct 105 ms 956 KB Output is correct
# Verdict Execution time Memory Grader output
1 Incorrect 54 ms 2340 KB Integer parameter [name=l_213] equals to 111, violates the range [0, 110]
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Execution timed out 5042 ms 264844 KB Time limit exceeded
2 Halted 0 ms 0 KB -