Submission #1320772

#TimeUsernameProblemLanguageResultExecution timeMemory
1320772yoshi_33550336Hidden Sequence (info1cup18_hidden)C++20
34 / 100
230 ms456 KiB
#include "grader.h"
using namespace std;
vector<int> findSequence(int n){
    vector<int> rc;
    while(rc.size()<n){
        int x = rc.size();
        for(bool c : {0,1}){
            for (int j = 0; j <= x;j++){
                auto v = rc;
                v.insert(v.begin()+j,c);
                if(isSubsequence(v)){
                    rc = v;
                    break;
                }
            }
            if(rc.size() != x) break;
        }
    }
    return rc;
}

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...