QOJ.ac
QOJ
ID | Problem | Submitter | Result | Time | Memory | Language | File size | Submit time | Judge time |
---|---|---|---|---|---|---|---|---|---|
#770937 | #7953. Product Delivery | vwxyz | Compile Error | / | / | C++23 | 256b | 2024-11-22 03:43:11 | 2024-11-22 03:43:11 |
Judging History
answer
N=int(input())
L,R=[],[]
for i in range(N):
l,r=map(int,input().split())
L.append(l)
R.append(r)
ans=0
cur=-1
for l,r in zip(L[::-1],R[::-1]):
if l<=cur:
cur=min(cur,r)
else:
ans+=1
cur=r
print(ans)
Details
answer.code:1:1: error: ‘N’ does not name a type 1 | N=int(input()) | ^