# | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
727004 | beaconmc | Coins (BOI06_coins) | Pypy 3 | 837 ms | 41460 KiB |
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
H=print
G=range
F=input
I,C=map(int,F().split())
A=[]
D=[]
for B in G(I):J,K=map(int,F().split());A.append(J);D.append(K)
E=0
sum=0
for B in G(len(A)-1):
if D[B]==0 and sum+A[B]<A[B+1]and sum+A[B]<C:E+=1;sum+=A[B]
if sum+A[-1]<C and D[-1]==0:E+=1;sum+=A[-1]
H(E)
H(C-sum)
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |