# | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
67156 | 2018-08-13T12:07:19 Z | quoriess | Hidden Sequence (info1cup18_hidden) | C++14 | 15 ms | 516 KB |
#include <bits/stdc++.h> #include "grader.h" /* g++ -Wall -grader.cpp -std=c++11 -c "%f" * */ using namespace std; vector<int> mult(int a,int x){ vector<int> ret; for (int i = 0; i < x; i++) { ret.push_back(a); } return ret; } void yazdir(vector<int> yazi){ for (int i = 0; i < (int)yazi.size(); i++) { //cout << yazi[i]; } //cout <<"\n"; } vector < int > findSequence (int N) { vector < int > ans (N, 0); int no0=0; for (int i = 1; i <= N; i++) { if(isSubsequence(mult(0,i)))no0++; else break; } //cout << "no 0: "<<no0<<"\n"; int fazla=0,az=1; if(N-no0>=no0){ swap(fazla,az); no0=N-no0; } //cout << "fazla: "<<fazla<<"\n"; //cout << "no 0: "<<no0<<"\n"; //cout << "geldi"<<"\n"; vector<int> templ=mult(fazla,no0); //son fazlayı çıkarttı int boslukind=no0+1; //cout << boslukind<<"\n"; while(boslukind>=0 && (int)templ.size() < N){ vector<int> cpy=templ; yazdir(templ); if(boslukind>no0)cpy.push_back(az); else cpy.insert(cpy.begin()+boslukind,az); yazdir(cpy); if(isSubsequence(cpy)){ //cout << "ss\n"; templ=cpy; } else{ //cout << "?"<<"\n"; boslukind--; continue; } } return templ; }
Compilation message
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Partially correct | 3 ms | 248 KB | Output is partially correct: Maximum length of a query = 8 |
2 | Partially correct | 4 ms | 308 KB | Output is partially correct: Maximum length of a query = 10 |
3 | Partially correct | 2 ms | 384 KB | Output is partially correct: Maximum length of a query = 8 |
4 | Partially correct | 2 ms | 384 KB | Output is partially correct: Maximum length of a query = 9 |
5 | Partially correct | 3 ms | 384 KB | Output is partially correct: Maximum length of a query = 7 |
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Partially correct | 12 ms | 428 KB | Output is partially correct: Maximum length of a query = 165 |
2 | Partially correct | 11 ms | 428 KB | Output is partially correct: Maximum length of a query = 178 |
3 | Partially correct | 11 ms | 456 KB | Output is partially correct: Maximum length of a query = 190 |
4 | Partially correct | 6 ms | 456 KB | Output is partially correct: Maximum length of a query = 153 |
5 | Partially correct | 11 ms | 480 KB | Output is partially correct: Maximum length of a query = 188 |
6 | Partially correct | 10 ms | 480 KB | Output is partially correct: Maximum length of a query = 172 |
7 | Partially correct | 10 ms | 480 KB | Output is partially correct: Maximum length of a query = 192 |
8 | Partially correct | 7 ms | 480 KB | Output is partially correct: Maximum length of a query = 164 |
9 | Partially correct | 12 ms | 480 KB | Output is partially correct: Maximum length of a query = 200 |
10 | Partially correct | 13 ms | 516 KB | Output is partially correct: Maximum length of a query = 199 |
11 | Partially correct | 15 ms | 516 KB | Output is partially correct: Maximum length of a query = 190 |
12 | Partially correct | 12 ms | 516 KB | Output is partially correct: Maximum length of a query = 199 |
13 | Partially correct | 9 ms | 516 KB | Output is partially correct: Maximum length of a query = 200 |