# | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
766785 | 2023-06-26T07:20:41 Z | DJeniUp | 자동 인형 (IOI18_doll) | C++17 | 56 ms | 15976 KB |
#include "doll.h" #include <bits/stdc++.h> using namespace std; typedef int ll; #define pb push_back #define fr first #define sc second ll h; vector<ll>v[200007]; vector<ll>c,x,y; void create_circuit(int M, std::vector<int> A) { A.pb(0); for(int i=0;i<A.size()-1;i++){ v[A[i]].pb(A[i+1]); } c.pb({A[0]}); for(int i=1;i<=M;i++){ if(v[i].size()==0)c.pb(0); else if(v[i].size()==1)c.pb(v[i][0]); else{ h++; x.pb(0); y.pb(0); x[h-1]=v[i][0]; c.pb(-h); for(int j=1;j<v[i].size();j++){ if(j==v[i].size()-1){ y[h-1]=v[i][j]; }else{ y[h-1]=-h-1; x.pb(0); y.pb(0); x[h]=v[i][j]; h++; } } } } // cout<<c.size()<<" "<<x.size()<<" "<<y.size()<<endl; for(int i=0;i<=M;i++){ // cout<<i<<" "<<c[i]<<endl; } for(int i=0;i<x.size();i++){ // cout<<-i-1<<" "<<x[i]<<" "<<y[i]<<endl; } answer(c,x,y); return ; }
Compilation message
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Correct | 3 ms | 4948 KB | Output is correct |
2 | Correct | 24 ms | 9300 KB | Output is correct |
3 | Correct | 17 ms | 8860 KB | Output is correct |
4 | Correct | 2 ms | 5000 KB | Output is correct |
5 | Correct | 10 ms | 6256 KB | Output is correct |
6 | Correct | 24 ms | 10948 KB | Output is correct |
7 | Correct | 3 ms | 5004 KB | Output is correct |
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Correct | 3 ms | 4948 KB | Output is correct |
2 | Correct | 24 ms | 9300 KB | Output is correct |
3 | Correct | 17 ms | 8860 KB | Output is correct |
4 | Correct | 2 ms | 5000 KB | Output is correct |
5 | Correct | 10 ms | 6256 KB | Output is correct |
6 | Correct | 24 ms | 10948 KB | Output is correct |
7 | Correct | 3 ms | 5004 KB | Output is correct |
8 | Correct | 44 ms | 12260 KB | Output is correct |
9 | Correct | 35 ms | 12660 KB | Output is correct |
10 | Correct | 51 ms | 15976 KB | Output is correct |
11 | Correct | 2 ms | 4948 KB | Output is correct |
12 | Correct | 3 ms | 4948 KB | Output is correct |
13 | Correct | 3 ms | 4948 KB | Output is correct |
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Correct | 3 ms | 4948 KB | Output is correct |
2 | Correct | 24 ms | 9300 KB | Output is correct |
3 | Correct | 17 ms | 8860 KB | Output is correct |
4 | Correct | 2 ms | 5000 KB | Output is correct |
5 | Correct | 10 ms | 6256 KB | Output is correct |
6 | Correct | 24 ms | 10948 KB | Output is correct |
7 | Correct | 3 ms | 5004 KB | Output is correct |
8 | Correct | 44 ms | 12260 KB | Output is correct |
9 | Correct | 35 ms | 12660 KB | Output is correct |
10 | Correct | 51 ms | 15976 KB | Output is correct |
11 | Correct | 2 ms | 4948 KB | Output is correct |
12 | Correct | 3 ms | 4948 KB | Output is correct |
13 | Correct | 3 ms | 4948 KB | Output is correct |
14 | Incorrect | 56 ms | 15860 KB | wrong motion |
15 | Halted | 0 ms | 0 KB | - |
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Incorrect | 2 ms | 4948 KB | wrong motion |
2 | Halted | 0 ms | 0 KB | - |
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Incorrect | 2 ms | 4948 KB | wrong motion |
2 | Halted | 0 ms | 0 KB | - |
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Incorrect | 2 ms | 4948 KB | wrong motion |
2 | Halted | 0 ms | 0 KB | - |