제출 #164534

#제출 시각아이디문제언어결과실행 시간메모리
164534boolodifjenulaProgramiranje (COCI17_programiranje)Cpython 3
40 / 80
3050 ms3940 KiB
s=input() Q=int(input()) O=[] for i in range (Q): A,B,C,D=map(int,input().split()) X=s[A-1:B] Y=s[C-1:D] x=26*[0] y=26*[0] for j in range(B-A+1): x[ord(X[j])-97]+=1 y[ord(Y[j])-97]+=1 if x==y: O+=["DA"] else: O+=["NE"] for i in range(Q): print(O[i])
#Verdict Execution timeMemoryGrader output
Fetching results...