RiseOJ는 solved.ac와 제휴 관계가 없습니다. 티어 아이콘 © solved.ac. solved.ac
포럼
COCI00184

Abeceda

Platinum IV 플래티넘 IV
난이도
1s
시간 제한
32MB
메모리 제한
0
맞았습니다!!
0
제출 수
0.0%
정답률
레이팅

의견: 0

설명

\(6^{th}\) round, March \(4^{th}\), 2011

Mirko has developed his own video game. The game has N levels and each successfully completed level
is worth a certain number of points, which add up to the player’s total score on an online rank list of all
players. Mirko has ordered his levels by difficulty from the easiest to the most difficult, but he has
made a mistake and made some difficult levels worth less points than some of the easier ones.
To overcome this problem, Mirko has decided to reduce the number of points for certain levels with
the goal of making the point sequence strictly increasing (so in the end easier levels are worth less
points than the difficult ones).
Help Mirko fix his video game in such a way that the total number of points reduced is minimal.
Final points have to be positive. You can assume that a solution exists for each test case.

제약
입력 형식

The first line of input contains a positive integer \(N\) (\(N \le 100\)), the number of words.

The following \(N\) lines contain the list of words found, one word per line. Each word consists of at most \(10\) lowercase letters.

출력 형식

The first and and only line of output should contain one numb\(er - th\)e minimum total number of points
Mirko has to subtract to fulfill requirements given in the task statement above.

서브태스크
서브태스크점수설명

Test 1

2점

None

Test 2

2점

None

Test 3

2점

None

Test 4

2점

None

Test 5

2점

None

Test 6

2점

None

Test 7

2점

None

Test 8

2점

None

Test 9

2점

None

Test 10

2점

None

Test 11

2점

None

Test 12

2점

None

Test 13

2점

None

Test 14

2점

None

Test 15

2점

None

Test 16

2점

None

Test 17

2점

None

Test 18

2점

None

Test 19

2점

None

Test 20

2점

None

Test 21

2점

None

Test 22

2점

None

Test 23

2점

None

Test 24

2점

None

Test 25

2점

None

Test 26

2점

None

Test 27

2점

None

Test 28

2점

None

Test 29

2점

None

Test 30

2점

None

Test 31

2점

None

Test 32

2점

None

Test 33

2점

None

Test 34

2점

None

Test 35

2점

None

Test 36

2점

None

Test 37

2점

None

Test 38

2점

None

Test 39

2점

None

Test 40

2점

None

Test 41

2점

None

Test 42

2점

None

Test 43

2점

None

Test 44

2점

None

Test 45

2점

None

Test 46

2점

None

Test 47

1점

None

Test 48

1점

None

Test 49

1점

None

Test 50

1점

None

Test 51

1점

None

Test 52

1점

None

Test 53

1점

None

Test 54

1점

None

예제 1
입력
5
ula
uka
klua
kula
al
출력
luka
예제 2
입력
4
jaja
baba
baja
beba
출력
!
예제 3
입력
3
marko
darko
zarko
출력
?
문제 정보

riseoj 작성

출처 COCI 2010/2011 Contest 6

평가 및 의견

Abeceda

개요
출제자 난이도 Platinum IV 플래티넘 IV 의견 0 / 50 공개 집계 (커뮤니티 난이도, 주요 주제, 품질)는 의견이 충분히 모이면 공개됩니다.

Log in to rate problems.

개별 의견

아직 의견이 없습니다. 자격이 된다면 위 양식에서 가장 먼저 평가해 보세요.

풀이 제출

Abeceda

게스트로 둘러보고 있습니다. 로그인하면 풀이를 제출하고 진행 상황을 확인할 수 있습니다. 로그인하고 제출하기
공개
C++20 Tab 들여쓰기 · Ctrl+/ 주석 토글 · Enter 자동 들여쓰기
1 1 1 0 공백: 4 · UTF-8