Submission #1207846

#TimeUsernameProblemLanguageResultExecution timeMemory
1207846lopkusHidden Sequence (info1cup18_hidden)C++20
0 / 100
1022 ms420 KiB
#include<bits/stdc++.h> #include "grader.h" using namespace std; vector < int > findSequence (int N) { std::vector<int> ans; while(ans.size() != N) { int ok = 0; for(int t = 0; t < 2&& !ok; t++) { for(int s = 0; s < 2 && !ok; s++) { if(t == 0) { std::vector<int> b; b.push_back(s); for(int i = 0; i < ans.size(); i++) { b.push_back(ans[i]); } if(isSubsequence(b)) { ok = 1; ans = b; break; } } else { std::vector<int> b = ans; b.push_back(s); if(isSubsequence(b)) { ok = 1; ans = b; break; } } } } } return ans; }

Compilation message (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...