# | Submission time | Handle | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
202208 | 2020-02-14T06:55:45 Z | blacktulip | Hidden Sequence (info1cup18_hidden) | C++14 | 19 ms | 320 KB |
#include <bits/stdc++.h> #include "grader.h" using namespace std; typedef long long lo; typedef pair< lo,lo > PII; #define fi first #define se second #define mp make_pair #define pb push_back #define fio() ios_base::sync_with_stdio(false);cin.tie(NULL);cout.tie(NULL) #define FOR for(int i=1;i<=n;i++) #define mid ((start+end)/2) #define ort ((bas+son)/2) const lo MAX = -1000000000000000000; const lo MIN = 1000000000000000000; const lo inf = 1000000000; const lo KOK = 100000; const lo LOG = 30; const lo li = 500005; const lo mod = 1000000007; int m,b[li],a[li],k,flag,t; int cev; string s; vector<int> v; vector < int > findSequence (int n){ vector<int> ans; ans.clear(); deque<int> dq; for(int i=0;i<n+100;i++){ deque<int> deq=dq; deq.pb(1); ans.clear(); while(deq.size()){ans.pb(deq.front());deq.pop_front();} if(isSubsequence(ans)==1){dq.pb(1);continue;} deq=dq; deq.push_front(1); ans.clear(); while(deq.size()){ans.pb(deq.front());deq.pop_front();} if(isSubsequence(ans)==1){dq.push_front(1);continue;} deq=dq; deq.push_front(0); ans.clear(); while(deq.size()){ans.pb(deq.front());deq.pop_front();} if(isSubsequence(ans)==1){dq.push_front(0);continue;} deq=dq; deq.pb(0); ans.clear(); while(deq.size()){ans.pb(deq.front());deq.pop_front();} if(isSubsequence(ans)==1){dq.pb(0);continue;} } ans.clear(); while(dq.size()){ans.pb(dq.front());dq.pop_front();} return ans; }
Compilation message
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Incorrect | 9 ms | 248 KB | Output is not correct: The length of the returned sequence is not N |
2 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Incorrect | 19 ms | 320 KB | Output is not correct: The length of the returned sequence is not N |
2 | Halted | 0 ms | 0 KB | - |