제출 #1141876

#제출 시각아이디문제언어결과실행 시간메모리
1141876stdfloatHidden Sequence (info1cup18_hidden)C++20
34 / 100
2 ms432 KiB
#include<bits/stdc++.h> #include "grader.h" // #include "grader.cpp" using namespace std; #define sz(v) (int)(v).size() vector<int> findSequence (int n) { vector<int> ans = {0}; while (isSubsequence(ans)) ans.push_back(0); ans.pop_back(); int x = -1; while (sz(ans) < n) { x++; ans.insert(ans.begin() + x, 1); while (sz(ans) <= n && isSubsequence(ans)) { x++; ans.insert(ans.begin() + x, 1); } ans.erase(ans.begin() + x); } return ans; }

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

grader.cpp: In function 'int main()':
grader.cpp:28:26: warning: format '%d' expects argument of type 'int', but argument 3 has type 'std::vector<int>::size_type' {aka 'long unsigned int'} [-Wformat=]
   28 |     fprintf (fifo_out, "%d\n", ans.size ());
      |                         ~^     ~~~~~~~~~~~
      |                          |              |
      |                          int            std::vector<int>::size_type {aka long unsigned int}
      |                         %ld
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...