#1166
Unrated
PŠENICA
시간 제한
1s
메모리 제한
32MB
제출
0
정답
0
맞힌 사람
0
정답 비율
0.0%

문제

1 second, 32 MB, 80 points Our heroes, Mirko and Slavko, plant Christmas wheat every year on Saint Lucy’s Day. It is well known that stalks of wheat grow at different speeds so, after a certain time, the wheat becomes quite messy. The guys are determined to solve this problem by playing the following game:

  • When it’s Mirko’s turn, he chooses a stalk of wheat with the minimal height and prolongs its

height so it’s of the same height as the first stalk longer than it.

  • When it’s Slavko’s turn, he chooses a stalk of wheat with the maximal height and cuts it to be

of the same height as the first stalk shorter than it.

  • The game lasts while there are at least three stalks of different heights and the loser is the player

who can’t make his move. For given heights of all stalks of wheat and the assumption that Mirko is the one starting the game, determine the winner of the game and the height of the shortest and longest stalk when the game is finished.

입력

The first line of input contains the integer N (1 ⩽N ⩽105), the number of wheat stalks. The second line of input contains N space separated integers that denote the heights of individual wheat stalks. The height of each stalk will be less than or equal to 105.

출력

The first line of output must contain the word “Mirko” if Mirko is the winner of the game, or “Slavko” if Slavko is the winner of the game. The second line of output must contain the height of the shortest and longest stalk when the game is finished.

예제 입력 1

3
3 3 3

예제 출력 1

Slavko
3 3

예제 입력 2

4
3 1 2 1

예제 출력 2

Slavko
1 2

예제 입력 3

7
2 1 3 3 5 4 1

예제 출력 3

Slavko
2 3
코드 제출

코드를 제출하려면 로그인이 필요합니다.

로그인
내 제출
제출 내역이 없습니다.
맞은 사람
아직 맞은 사람이 없습니다.
난이도 투표
Unrated0명 투표
로그인 후 AC 받으면 투표할 수 있습니다.
전체 제출
제출 내역이 없습니다.