55022023-07-03 23:25:48AndrosKártyajátékcpp17Wrong answer 0/30500ms17668 KiB
#include <iostream>
#define ll long long

using namespace std;

int main()
{

	ll n, k;
	cin >> n >> k;
	ll* t = new ll[k];
	for (int i = 0; i < k; i++)
	{
		cin >> t[i];
	}

	cout << "Calculating..." << endl;
	ll pontszam = 0;
	ll kivett_max = 0;
	for (int i = 0; i < k; i++)
	{
		ll szam = t[i];

		//Végigmegy a maradékon
		for (int j = i + 1; j < k; j++)
		{
			//Ha van ami kisebb, de az eddigieknél nagyobb.
			if (t[j] < szam && t[j] > kivett_max) {
				pontszam++;
				break;
			}
		}

		kivett_max = max(kivett_max, szam);//Sokkal szebb.

	}
	cout << pontszam;

}
SubtaskSumTestVerdictTimeMemory
base0/30
1Wrong answer0/03ms1872 KiB
2Time limit exceeded0/0499ms3956 KiB
3Wrong answer0/13ms4144 KiB
4Wrong answer0/12ms4264 KiB
5Wrong answer0/13ms4368 KiB
6Wrong answer0/24ms4592 KiB
7Wrong answer0/24ms4824 KiB
8Wrong answer0/24ms5060 KiB
9Time limit exceeded0/1500ms5200 KiB
10Time limit exceeded0/2456ms6328 KiB
11Time limit exceeded0/3469ms7104 KiB
12Time limit exceeded0/3472ms8084 KiB
13Time limit exceeded0/1476ms10112 KiB
14Time limit exceeded0/2465ms11940 KiB
15Time limit exceeded0/3460ms13916 KiB
16Time limit exceeded0/3469ms15652 KiB
17Time limit exceeded0/3465ms17668 KiB