Logo
(追記) (追記ここまで)

32464번 - Graceful Triangles 스페셜 저지다국어

시간 제한메모리 제한제출정답맞힌 사람정답 비율
2 초 (추가 시간 없음) 1024 MB (추가 메모리 없음)1601026769.792%

문제

Consider the following graph in the shape of $n$ equilateral triangles stitched together horizontally:

This graph has $n+2$ vertices and 2ドルn+1$ edges. The vertices are labeled in the order of increasing horizontal position, as in the image above.

In other words, the graph has $n+2$ vertices labeled from 1ドル$ through $n+2,ドル and 2ドルn+1$ edges connecting all pairs of vertices whose labels differ by at most 2ドル$.

A positive integer value is assigned to each vertex. Vertex $i$ has the value of $v_i$. The value of an edge that connects vertices $i$ and $j$ is $|v_i-v_j|$. Find a way to assign values to all vertices so that for every positive integer $k$ up to 2ドルn+1$ inclusive, exactly one edge has the value of $k$. The value of any vertex cannot exceed 10ドル^{18}$.

입력

The first line contains $n,ドル a positive integer.

출력

If a solution exists for the given $n,ドル print the values assigned to the vertices 1,2,ドル\ldots ,n+2$ in one line, separated by spaces. The values must be positive integers not exceeding 10ドル^{18}$. Otherwise, print $-1$.

제한

  • 1ドル\le n\le 200,円 000$

예제 입력 1

1

예제 출력 1

3 1 4

노트

출처

University > KAIST > KAIST ICPC Mock Competition > 2024 KAIST 14th ICPC Mock Competition D번

(追記) (追記ここまで)

출처

대학교 대회

  • 사업자 등록 번호: 541-88-00682
  • 대표자명: 최백준
  • 주소: 서울시 서초구 서초대로74길 29 서초파라곤 412호
  • 전화번호: 02-521-0487 (이메일로 연락 주세요)
  • 이메일: contacts@startlink.io
  • 통신판매신고번호: 제 2017-서울서초-2193 호

AltStyle によって変換されたページ (->オリジナル) /