제출 #594582

#제출 시각아이디문제언어결과실행 시간메모리
594582mosiashvililuka자동 인형 (IOI18_doll)C++14
6 / 100
100 ms15560 KiB
#include<bits/stdc++.h> #include "doll.h" using namespace std; int a,b,c,d,e,i,j,ii,jj,zx,xc,f[200009],pi; vector <int> C,X,Y,v[200009]; void create_circuit(int MM, std::vector<int> AA) { a=AA.size();b=MM; for(i=1; i<=a; i++) f[i]=AA[i-1]; C.resize(b+1);pi=0; for(i=1; i<a; i++){ v[f[i]].push_back(f[i+1]); } v[f[a]].push_back(0); C[0]=f[1]; for(i=1; i<=b; i++){ if(v[i].size()==0) continue; if(v[i].size()==1){ C[i]=v[i][0]; continue; } pi--; C[i]=pi; X.push_back(v[i][0]); Y.push_back(v[i][1]); } answer(C,X,Y); }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...