| # | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
|---|---|---|---|---|---|---|---|
| 1231863 | durdona | Trampoline (info1cup20_trampoline) | Pypy 3 | 366 ms | 106868 KiB |
r,c,n=map(int,input().split())
m=[['b']*(c+1) for i in range(r+1)]
def dfs(x1,y1,x2,y2,v):
if (x1,y1) in v:
return False
if x1==x2 and y1==y2:
return True
v.add((x1,y1))
if m[x1][y1]=='g':
if (x1+1<=r) and dfs(x1+1,y1,x2,y2,v):
return True
elif (y1+1<=c) and dfs(x1,y1+1,x2,y2,v):
return True
else:
if (y1+1<=c) and dfs(x1,y1+1,x2,y2,v):
return True
return False
for i in range(n):
a,b=map(int,input().split())
m[a][b]='g'
q=int(input())
for i in range(q):
x1,y1,x2,y2=map(int,input().split())
if dfs(x1,y1,x2,y2,set()):
print('Yes')
else:print('No')
컴파일 시 표준 출력 (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... | ||||
| # | Verdict | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
