제출 #96487

#제출 시각아이디문제언어결과실행 시간메모리
96487CamaroesHidden Sequence (info1cup18_hidden)C++14
10 / 100
1588 ms420 KiB
#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;
}

컴파일 시 표준 에러 (stderr) 메시지

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 timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...