Hacking on Codeforces Round 805 div 3

Revision en3, by laxmi_kanth, 2022-07-10 21:33:37

My solution of code forces round div 3 for C (train queries) was hacked and I didn't find the case where I would fail.Please help me find that case. I really appreciate any help you can provide.

Here is my code ```

def solve(): d = defaultdict(list)

# n = int(input())
# s=input()
e=input()
n,m=list(map(int,input().split()))
#
lis = list(map(int, input().split()))
# lis1=input().split()
# lis2 = list(map(int, input().split()))
# lis3 = list(map(int, input().split()))
# n,r,b=list(map(int,input().split()))
# order=list(map(int,input().split()))
# r2,c2=list(map(int,input().split()))
# ans=[[-1 for _ in range(m)] for _ in rnage(n)]
for i,ele in enumerate(lis):
    d[ele].append(i)
for _ in range(m):
    u,v=list(map(int,input().split()))
    if(u not in d or v not in d):
        print("NO")
        continue
    if(d[u][0]<d[v][-1]):
        print("YES")
    else:
        print("NO")

```

History

 
 
 
 
Revisions
 
 
  Rev. Lang. By When Δ Comment
en3 English laxmi_kanth 2022-07-10 21:33:37 60
en2 English laxmi_kanth 2022-07-10 21:20:12 5
en1 English laxmi_kanth 2022-07-10 21:19:28 1027 Initial revision (published)