Submission #1134813

#TimeUsernameProblemLanguageResultExecution timeMemory
1134813lopkusHidden Sequence (info1cup18_hidden)C++20
34 / 100
198 ms468 KiB
#include<bits/stdc++.h>

#include "grader.h"

using namespace std;

vector<int> findSequence(int N){
    vector<int> ans;
    while(ans.size() != N) {
        for(int i = 0; i <= ans.size(); i++) {
            vector<int> B = ans;
            B.insert(B.begin() + i, 0);
            if(isSubsequence(B)) {
                ans = B;
                break;
            }
            B = ans;
            B.insert(B.begin() + i, 1);
            if(isSubsequence(B)) {
                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...