| # | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
|---|---|---|---|---|---|---|---|
| 1285916 | Joon_Yorigami | Art Exhibition (JOI18_art) | Pypy 3 | 148 ms | 48736 KiB |
n,*r,=map(int,open(0).read().split())
p=[0]
indices=[*range(n)]
indices.sort(key=lambda x:r[(x<<1)])
z=r[(indices[-1]<<1)+1]
acc=0
for _ in indices:
b=r[(_<<1)+1]
acc+=b
p.append(acc)
maxi=r[(indices[0]<<1)]
for i in range(n):
a=r[indices[i]<<1]
z=max(z,p[i+1]-a+maxi)
maxi=max(maxi,a-p[i])
print(z)
컴파일 시 표준 출력 (stdout) 메시지
| # | 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... | ||||
