Submission #96487

# Submission time Handle Problem Language Result Execution time Memory
96487 2019-02-09T16:45:58 Z Camaroes Hidden Sequence (info1cup18_hidden) C++14
10 / 100
400 ms 420 KB
#include "grader.h"

using namespace std;

vector<int> findSequence(int N)
{
    vector<int> ans (N, 0);
    for(;;)
	{
		if(isSubsequence(ans)) return ans;
		for(int i = 0; i < N; i++)
		{
			if(ans[i] == 0)
			{
				ans[i] = 1;
				i = N;
			}
			if(ans[i] == 1)
			{
				ans[i] = 0;
			}
		}
	}

    return ans;
}

Compilation message

grader.cpp: In function 'int main()':
grader.cpp:28:43: warning: format '%d' expects argument of type 'int', but argument 3 has type 'std::vector<int>::size_type {aka long unsigned int}' [-Wformat=]
     fprintf (fifo_out, "%d\n", ans.size ());
                                ~~~~~~~~~~~^
grader.cpp:29:20: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
     for (int i=0; i<ans.size () && i < N; i++)
                   ~^~~~~~~~~~~~
# Verdict Execution time Memory Grader output
1 Partially correct 4 ms 420 KB Output is partially correct: Maximum length of a query = 8
2 Partially correct 4 ms 376 KB Output is partially correct: Maximum length of a query = 10
3 Partially correct 4 ms 256 KB Output is partially correct: Maximum length of a query = 8
4 Partially correct 7 ms 376 KB Output is partially correct: Maximum length of a query = 9
5 Partially correct 2 ms 248 KB Output is partially correct: Maximum length of a query = 7
# Verdict Execution time Memory Grader output
1 Execution timed out 1588 ms 376 KB Time limit exceeded (wall clock)
2 Halted 0 ms 0 KB -