| # | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 | 
|---|---|---|---|---|---|---|---|
| 382978 | Alexandra | Baloni (COCI15_baloni) | Cpython 3 | 2094 ms | 104700 KiB | 
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
n = int(input())
h = input().split()
h = list(map(int, h))
resp = 0
rotos = []
try:
    for i in range (len(h)):
      rotos = []
      target = min(h)
      arrow = target + 1
      o = h.index(target)
      h.pop(o)
      resp += 1
      if h.index(min(h)) < o:
        for j in range (o-1, -1, -1):
          if h[j] == arrow:
            arrow += 1
            rotos.append(j)
        rotos.sort(reverse=True)
        for j in range (len(rotos)):
          h.pop(rotos[j])
    print (str(resp))
except:
    print (str(resp))
| # | Verdict | Execution time | Memory | Grader output | 
|---|---|---|---|---|
| Fetching results... | ||||
