Submission #693128

# Submission time Handle Problem Language Result Execution time Memory
693128 2023-02-02T11:57:18 Z auslander CONSUL (info1cup19_consul) C++17
15 / 100
27 ms 288 KB
#include "grader.h"
#include <map>
using namespace std;

map<int, int>mp;

void solve(int n)
{
	int i;
	int l = 60;
	if (n <= 50)
		l = 50;
	for (i = 1; i <= min(l, n);)
	{
		int k = kth(i);
		i++;
		if (mp[k] == 0)
		{
			mp[k] = cnt(k);
			i++;
		}
		if (mp[k] > n / 3)
		{
			say_answer(k);
			return;
		}
	}
	say_answer(-1);
}
# Verdict Execution time Memory Grader output
1 Correct 12 ms 208 KB Output is correct
# Verdict Execution time Memory Grader output
1 Partially correct 27 ms 288 KB Output is partially correct
2 Incorrect 8 ms 284 KB Wrong answer
3 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Correct 14 ms 284 KB Output is correct
2 Correct 27 ms 288 KB Output is correct
3 Incorrect 1 ms 208 KB Wrong answer
4 Halted 0 ms 0 KB -