# | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
202207 | 2020-02-14T06:54:56 Z | blacktulip | Hidden Sequence (info1cup18_hidden) | C++14 | 11 ms | 376 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;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
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Incorrect | 5 ms | 376 KB | Output is not correct: The length of the returned sequence is not N |
2 | Halted | 0 ms | 0 KB | - |
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Incorrect | 11 ms | 248 KB | Output is not correct: The length of the returned sequence is not N |
2 | Halted | 0 ms | 0 KB | - |