제출 #47198

#제출 시각아이디문제언어결과실행 시간메모리
47198KmcodeHidden Sequence (info1cup18_hidden)C++14
34 / 100
25 ms580 KiB
#include "bits/stdc++.h" #include "grader.h" using namespace std; vector<int> findSequence(int N) { vector<int> vv; int ls = 0; while (N--) { while (1) { vv.insert(vv.begin() + vv.size() - ls, 0); if (isSubsequence(vv)) { break; } vv[vv.size() - ls - 1] ^= true; if (isSubsequence(vv)) { break; } vv.erase(vv.begin() + vv.size() - (ls+1), vv.begin() + vv.size() - (ls+1) + 1); ls++; } } return vv; }

컴파일 시 표준 에러 (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...