| # | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
|---|---|---|---|---|---|---|---|
| 1319042 | m.zeeshanrashid | Hidden Sequence (info1cup18_hidden) | C++20 | 3 ms | 440 KiB |
// #ifdef __AVX2__
// #pragma GCC target "avx2"
// #endif
// #pragma GCC optimize "O3"
// #pragma GCC optimize "unroll-loops"
#include <bits/stdc++.h>
#include "grader.h"
// #include <ext/pb_ds/assoc_container.hpp>
// #include <ext/pb_ds/tree_policy.hpp>
// using namespace __gnu_pbds;
using namespace std;
// #define int long long
#define elif else if
#define all(l) begin(l),end(l)
#define rall(l) rbegin(l),rend(l)
#define append push_back
#define print(l) for(auto i:l) cout<<i<<' '; cout<<endl;
#define pprint(a,b) cout<<a<<' '<<b<<endl;
#define inp(l) for(auto &i:l) cin>>i;
// #define ordered_set tree<int, null_type,less<int>, rb_tree_tag,tree_order_statistics_node_update>
#define pai make_pair
#define endl "\n"
#define pii pair<int,int>
#define fi first
#define se second
#define vec vector
// const int mod=998244353;
const int mod1=998244353;
const int mod=1e9+7;
vector < int > findSequence (int n)
{
vec<int>ans;
if(!isSubsequence({0})){
for(int i=0;i<n;i++) ans.append(1);
return ans;
}
if(!isSubsequence({1})){
for(int i=0;i<n;i++) ans.append(0);
return ans;
}
while(isSubsequence(ans)) ans.append(0);
ans.pop_back();
int i=0;
while(ans.size()<n){
ans.insert(begin(ans)+i,1);
if(!isSubsequence(ans)){
ans.erase(begin(ans)+i);
i++;
continue;
}
}
return ans;
}
컴파일 시 표준 에러 (stderr) 메시지
| # | Verdict | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
| # | Verdict | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
