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

31687번 - Trokut 서브태스크다국어

시간 제한메모리 제한제출정답맞힌 사람정답 비율
1 초 1024 MB28141450.000%

문제

Ivan and Lucija are on a journey to a place far... far away. They know that the journey will last a long time and that they will be bored at some point. While they were thinking about what to do, Lucija came up with a game.

She drew $N$ points on paper so that they form the vertices of a regular $N$-gon and labeled them sequentially from 1ドル$ to $N$. The player whose turn it is selects two of the drawn $N$ points such that the line segment connecting those two points does not intersect any of the previously drawn line segments and connects those two points. Line segments are allowed to touch at vertices. A player wins if after their move there exist three connected line segments forming a triangle, i.e., if there exist three points such that they are all connected by the drawn line segments. Of course, players are allowed to connect adjacent vertices, and those line segments are considered for triangle formation. Players take turns, and Lucija is the first to play.

Both are extremely skilled players, and we know they will play optimally. Your task is to determine, for a given $N,ドル who will be the winner of the game. It can be shown that the game will always end after a finite number of moves and that there will always be a winner.

입력

In the first row there is an integer $T$ (1ドル ≤ T ≤ 10,円 000$), number of scenarios. In the next $T$ rows there is an integer $N$ (3ドル ≤ N ≤ 10^9$), number of points Lucija drew on a piece of paper.

출력

In $T$ rows, for every scenario in given order, output "Ivan" or "Lucija" (without quotes), winner in a given scenario.

제한

서브태스크

번호배점제한
113

$T ≤ 18,ドル $N ≤ 20$

236

$T ≤ 998,ドル $N ≤ 1,円 000$

315

$N ≤ 10^5$

446

No additional constraints.

예제 입력 1

3
3
4
5

예제 출력 1

Lucija
Lucija
Ivan

When $N = 3,ドル then all three possible line segments must be connected, and Lucija wins. When $N = 4,ドル then Lucija can connect the line segment between points 1 and 3. We see that after any move by Ivan, Lucija can connect a triangle and win.

예제 입력 2

3
7
8
9

예제 출력 2

Lucija
Lucija
Ivan

힌트

출처

Contest > Croatian Open Competition in Informatics > COCI 2023/2024 > Contest #5 5번

채점 및 기타 정보

  • 예제는 채점하지 않는다.
(追記) (追記ここまで)

출처

대학교 대회

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

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