| # | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
|---|---|---|---|---|---|---|---|
| 44401 | leejseo | Art Exhibition (JOI18_art) | Cpython 2 | 14 ms | 2936 KiB |
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
from sys import stdin
range = xrange
raw_input = stdin.readline
N = int(raw_input())
L = [None]*N
for i in range(N):
a, b = map(int, raw_input().split())
L[i] = (a, b)
L.sort()
S = [0]*(N+1)
for i in range(N):
a, b = L[i]
S[i+1] = S[i] + b
ans = 0
for j in range(N):
for i in range(j):
ans = max(ans, S[j+1] - S[i] + L[i][0] - L[j][0])
print ans| # | Verdict | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
| # | Verdict | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
| # | Verdict | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
| # | Verdict | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
