Team Ai
Datasetpublic

peterverebics/CodeNet_Python_118

sourceHugging Facemitupdated 1y agoView on Hugging Face
0likes17downloads
valid.csv116880 linesDownload Raw Back to root
1problem_id,submission_id,status,code2p02547,s702699872,Accepted,"n=int(input())3D = [list(map(int,input().split())) for i in range(n)]4for i in range(n-2):5  if D[i][0] == D[i][1] and D[i+1][0] == D[i+1][1] and D[i+2][0] == D[i+2][1]:6    print(""Yes"")7    break8else:9  print(""No"")"10p02547,s003487850,Accepted,"n = int(input())11li = [0]*n12for i in range(n):13    d1,d2 = map(int,input().split())14    if d1==d2:15        li[i] = 116lii = [0]*n17lii[0]=li[0]18for i in range(n-1):19    if li[i+1]==1:20        lii[i+1]=lii[i]+li[i+1]21    else:22        lii[i+1]=023 24if max(lii)>=3:25    print(""Yes"")26else:27    print(""No"")"28p02547,s849077240,Accepted,"n=int(input())29q=[]30for _ in range(n):31    d_1,d_2=map(int,input().split())32    if d_1==d_2:33        q.append(1)34    else:35        q.append(0)36for i in range(n-2):37    if q[i]==q[i+1]==q[i+2]==1:38        print(""Yes"")39        exit()40print(""No"")"41p02547,s056825648,Accepted,"def main():42    n = int(input())43 44    cont = 045    for _ in range(n):46        a, b = map(int, input().split())47        if a == b:48            cont += 149            if cont >= 3:50                print('Yes')51                return52        else:53            cont = 054    print('No')55 56 57if __name__ == '__main__':58    main()59"60p02547,s706697739,Accepted,"n = int(input().rstrip())61cnt = 062flg = False63d_list = [[0, 0] for i in range(n)]64for i in range(n):65  d_list[i] = list(map(int, input().rstrip().split("" "")))66for ds in d_list:67  if ds[0] == ds[1]:68    cnt += 169  else:70    cnt = 071  if cnt >= 3:72    flg = True73    break74if flg:75  print(""Yes"")76else:77  print(""No"")"78p02547,s733223973,Accepted,"import sys79 80def main():81    N = int(sys.stdin.readline().rstrip())82 83    cnt = 084    ans = ""No""85    for i in range(N):86        a,b = map(int, sys.stdin.readline().rstrip().split())87        if a == b:88            cnt += 189        else:90            cnt =091        92        if cnt == 3:93            ans = ""Yes""94 95    print(ans)96 97 98main()"99p02547,s676211455,Accepted,"LI = lambda: list(map(int, input().split()))100 101N = int(input())102D = [LI() for _ in range(N)]103 104 105def main():106    m = 0107    x = 0108    for a, b in D:109        if a == b:110            x += 1111            m = max(m, x)112        else:113            x = 0114    ans = ""Yes"" if m >= 3 else ""No""115    print(ans)116 117 118if __name__ == ""__main__"":119    main()120"121p02547,s177766368,Accepted,"import numpy as np122n = int(input())123d = np.array([input().split() for i in range(n)])124 125for i in range(n - 2):126    if d[i, 0] == d[i, 1] and d[i + 1, 0] == d[i + 1, 1] and d[i + 2, 0] == d[i + 2, 1]:127        print(""Yes"")128        exit()129 130print(""No"")"131p02547,s150835576,Accepted,"n=int(input())132s=0133l=0134for i in range(n):135    b,c=map(int,input().split())136    if b==c:137        l+=1138    else:139        l=0140    if l>=3:141        s+=1142 143if s==0:144    print(""No"")145else:146    print(""Yes"")"147p02547,s823633845,Accepted,"n = int(input())148a = []149res = False150for i in range(n):151    x, y = map(int, input().split())152    a.append(x == y)153    if i >= 2 and a[-1] and a[-2] and a[-3]:154        res = True155print('Yes' if res else 'No')156"157p02547,s351582822,Accepted,"N = int(input())158ans = 0159for i in range(N):160  x, y = map(int, input().split())161  if x == y:162    ans += 1163  else:164    ans = 0165  if ans == 3:166    break167if ans == 3:168  print('Yes')169else:170  print('No')"171p02547,s638419675,Accepted,"n = int(input())172count = 0173flag = False174for i in range(n):175    d1,d2 = map(int,input().split())176    if d1 == d2:177        count += 1178        if count == 3:179            flag = True180    else:181        count = 0182if flag:183    print(""Yes"")184else:185    print(""No"")"186p02547,s152866798,Accepted,"n = int(input())187cnt = 0188ans = ""No""189for i in range(n):190    d1, d2 = map(int,input().split())191    if d1 == d2:192        cnt += 1193    else:194        cnt = 0195    if cnt == 3:196        ans = ""Yes""197print(ans)"198p02547,s722370148,Accepted,"n = int(input())199c = 0200for i in range(n):201    a,b = map(int,input().split())202    if a == b:203        c += 1204    else:205        c = 0206    if c == 3:207        break208if c == 3:209    print(""Yes"")210else:211    print(""No"")"212p02547,s106696776,Accepted,"N = int(input())213 214D1, D2 = [0] * N, [0] * N215 216for i in range(N):217    a, b = map(int, input().split())218 219    D1[i], D2[i] = a, b220 221for i in range(2, N):222 223    if D1[i-2] == D2[i-2] and D1[i-1] == D2[i-1] and D1[i] == D2[i]:224        print(""Yes"")225        exit()226 227print(""No"")228"229p02547,s161146354,Accepted,"N = int(input())230 231i = 0232res = False233 234for _ in range(N):  235    a, b = map(int,input().split())236 237    if a == b:238        i += 1239    else:240        i = 0241        242    if i >= 3:243        res = True244 245print(""Yes"" if res else ""No"")"246p02547,s654545971,Accepted,"N = int(input())247count = 0248for i in range(N):249    D1, D2 = map(int, input().split())    250    if D1==D2:251        count += 1252    else:253        count = 0254    if count == 3:255        print('Yes')256        exit()257print('No')258"259p02547,s281958177,Accepted,"import sys260import math261def get_array(): return list(map(int, sys.stdin.readline().strip().split()))262def get_ints(): return map(int, sys.stdin.readline().strip().split())263def input(): return sys.stdin.readline().strip()264n=int(input())265ans=0266flag=0267for i in range(n):268    d1,d2=get_ints()269    if d1==d2:270        ans=ans+1271        if ans>=3:272            flag=1273    else:274        ans=0275if flag==1:276    print(""Yes"")277else:278    print(""No"")"279p02547,s895197771,Accepted,"n =  int(input())280d = [list(map(int,input().split())) for i in range(n)]281cnt = 0282 283for i in range(n):284    if d[i][0] == d[i][1]:285        cnt += 1286        if cnt == 3:287            print('Yes')288            break289    else:290        cnt = 0291else:292    print('No')"293p02547,s518351150,Accepted,"N = int(input())294 295cnt = 0296for i in range(N):297  a, b = map(int, input().split())298  if a == b:299    cnt += 1300  else:301    cnt = 0302  if cnt == 3:303    print('Yes')304    exit()305print('No')"306p02547,s243540979,Accepted,"n = int(input())307 308c = 0309flag = False310 311for i in range(n):312    x, y = list(map(int, input().split()))313    if x == y:314        c += 1315        if c == 3:316            flag = True317            break318    else:319        c = 0320 321if flag:322    print(""Yes"")323else:324    print(""No"")"325p02547,s128751717,Accepted,"N = int(input())326 327d = [ list(map(int,input().split())) for i in range(N)]328 329for i in range(N-2):330    if d[i][0] == d[i][1] and d[i+1][0] == d[i+1][1] and d[i+2][0] == d[i+2][1]:331        print(""Yes"")332        break333else:334    print(""No"")"335p02547,s326896680,Accepted,"n=int(input())336d1=[]337d2=[]338f=0339for i in range(n):340    x,y=map(int, input().split())341    d1.append(x)342    d2.append(y)343for i in range(2,n):344    if d1[i]==d2[i] and d1[i-1]==d2[i-1] and d1[i-2]==d2[i-2] :345        f=1346if f==1:347    print('Yes')348else:349    print('No')"350p02547,s927984583,Accepted,"n = int(input())351cnt = 0352flg = False353for i in range(n):354  a,b = list(map(int,input().split()))355  if a == b:356    cnt +=1357    if cnt > 2:358      flg = True359  else:360    cnt = 0361if flg:362  print('Yes')363else:364  print('No')"365p02547,s540917350,Accepted,"def solve():366    N = int(input())367 368    D1 = [0] * N369    D2 = [0] * N370 371    for i in range(N):372        D1[i], D2[i] = map(int, input().split())373 374    c = 0375    judge = 0376 377    for i in range(N):378        if D1[i]==D2[i]:379            c += 1380        else:381            c = 0382 383        if c>2:384            judge += 1385 386    if judge!=0:387        print(""Yes"")388    else:389        print(""No"")390 391 392if __name__ == ""__main__"":393    solve()394"395p02547,s998941842,Accepted,"N=int(input())396flag=0397count=0398for i in range(N):399    d1,d2=map(int,input().split())400    if(d1==d2):401        count+=1402    else:403        count=0404    if(count==3):405        flag=1406        break407if(flag==1):408    print(""Yes"")409else:410    print(""No"")"411p02547,s969155046,Accepted,"n= int(input())412cont=0413yes=0414for x in range(n):415    a,b= input().split()416    a, b= int(a), int(b)417    if a==b:418        cont+=1419    else:420        cont=0421    if cont>=3:422        yes=1423if yes==1:424    print(""Yes"")425else:426    print(""No"")"427p02547,s300858855,Accepted,"N = int(input())428 429D = []430for i in range(N):431    d1, d2 = map(int, input().split())432    D.append([d1, d2])433 434count = 0435for i in range(N):436    if D[i][0] == D[i][1]:437        count += 1438        if count == 3:439            break440    else:441        count = 0442 443print(""Yes"") if count == 3 else print(""No"")444"445p02547,s032099533,Accepted,"N = int(input())446flag = 0447ans = ""No""448for i in range(N):449  A,B = input().split()450  if A == B:    451    flag += 1452  else:453    flag = 0454  if flag == 3:455    ans = ""Yes""456    break457    458print(ans)"459p02547,s458394018,Accepted,"n=int(input())460cnt=0461for i in range(n):462  a,b=map(int,input().split())463  if a==b:464    cnt+=1465    if cnt==3:466      print(""Yes"")467      exit()468  else:469    cnt=0470print(""No"")   "471p02547,s350538019,Accepted,"n = int(input())472count = 0473ans = ""No""474for i in range(n):475    a,b = input().split()476    if a == b:477        count += 1478    else:479        count = 0480    if count == 3:481        ans =""Yes""482        483print(ans)"484p02547,s312770512,Accepted,"N = int(input())485 486xy = [map(int,input().split()) for _ in range(N)]487x,y = [list(i) for i in zip(*xy)]488 489ans = 0490flag = False491 492for i in range(N):493    if x[i] == y[i]:494        ans +=1495    elif ans >= 3:496        flag = True497        ans = 0498    else:499        ans = 0500        501if ans >= 3  or flag ==True:502    print(""Yes"")503    504else:505    print(""No"")"506p02547,s211718590,Accepted,"N = int(input())507D = [list(map(int,input().split())) for x in range(N)]508flag = """"509 510for p in range(N):511    if D[p][0] == D[p][1]:512        flag += ""1""513    else:514        flag += ""0""515 516if ""111"" in flag:517    print(""Yes"")518else:519    print(""No"")520 521"522p02547,s988935142,Accepted,"n=int(input())523a=0524h=0525for i in range(n):526    x,y=map(int,input().split())527    if x==y:528        a=a+1529    else:530        a=0531    if a==3:532        h=1533if h==1:534    print(""Yes"")535else:536    print(""No"")"537p02547,s856449591,Accepted,print('NYoe s'[' 1 1 1'in' '.join(str(len({*t.split()}))for t in open(0))::2])538p02547,s607119976,Accepted,"import sys539input = sys.stdin.readline540 541 542def main():543    N = int(input())544    D = [list(map(int, input().split())) for _ in range(N)]545 546    zorome_count = 0547    for d in D:548        if d[0] == d[1]:549            zorome_count += 1550        else:551            zorome_count = 0552        if zorome_count == 3:553            break554 555    print('Yes' if zorome_count == 3 else 'No')556 557 558if __name__ == ""__main__"":559    main()560"561p02547,s655544320,Accepted,"def checkDoublet(arr):562    count = 0563    for d in arr:564        if d[0] == d[1]:565            count += 1566            if count >= 3:567                return 'Yes'568        else:569            count = 0570    return 'No'571 572n = int(input())573arr = []574for i in range(n):575    arr.append(list(map(int, input().rstrip().split())))576print(checkDoublet(arr))"577p02547,s649906186,Accepted,"def main():578    N = int(input())579    zorome_count = 0580    for i in range(N):581        d1, d2 = map(int, input().split())582        if d1 == d2:583            zorome_count += 1584        else:585            zorome_count = 0586        587        if zorome_count == 3:588            print('Yes')589            return590    print('No')591 592if __name__ == '__main__':593    main()"594p02547,s574351674,Accepted,"N = int(input())595 596ans  = 0597for i in range(N):598    d1,d2 = map(int, input().split())599    if d1 == d2:600        ans += 1601        if ans == 3:602            print(""Yes"")603            exit()604    else:605        ans = 0606else:607    print(""No"")"608p02547,s747823865,Accepted,"# author:  Taichicchi609# created: 19.09.2020 21:01:22610 611import sys612 613N = int(input())614 615c = 0616 617 618for i in range(N):619    d1, d2 = map(int, input().split())620    if d1 == d2:621        c += 1622    else:623        c = 0624    if c == 3:625        print(""Yes"")626        exit()627 628print(""No"")629"630p02547,s322885101,Accepted,"N = int(input())631count = 0632flg = False633for i in range(N):634    635    d1,d2 = map(int,input().split())636    if d1 == d2:637        count += 1638        if count ==3:639            flg = True640    else:641        count = 0642if flg:643    print(""Yes"")644else:645    print(""No"")"646p02547,s782543432,Accepted,"n = int(input())647d = [list(map(int, input().split()))for _ in range(n)]648 649cnt = 0650for i, (p, q) in enumerate(d):651    if p == q:652        cnt += 1653    else:654        cnt = 0655    if cnt == 3:656        print(""Yes"")657        break658else:659    print(""No"")"660p02547,s354859689,Accepted,"n = int(input())661 662a = [0]*n663 664for i in range(n):665    d1, d2 = map(int, input().split())666    if d1 == d2:667        a[i] = 1668ans = 'No'        669for i in range(n-2):670    if a[i]*a[i+1]*a[i+2] ==1:671        ans = 'Yes'672        673print(ans)"674p02547,s293648401,Accepted,"def main():675    import sys676    N=int(sys.stdin.readline())677    count=0678    for i in range(N):679        D1,D2=list(map(int,sys.stdin.readline().split()))680        if D1==D2:681            count+=1682        else:683            count=0684        if count==3:685            print('Yes')686            break687    else:688        print('No')689 690main()"691p02547,s161905407,Accepted,"def myfunc():692    N = int(input())693 694    counter = 0695    for i in range(N):696        A, B = map(int, input().split())697        if A == B:698            counter += 1699            if counter >= 3:700                print('Yes')701                return 0702        else:703            counter = 0704    print('No')705 706if __name__ == ""__main__"":707    myfunc()"708p02547,s960040996,Accepted,"N = int(input())709D = [None] * N710for i in range(N):711    D[i] = list(map(int, input().split()))712for i in range(N-2):713    for j in range(3):714        if D[i+j][0] != D[i+j][1]:715            break716    else:717        print('Yes')718        exit()719print('No')720"721p02547,s126399967,Accepted,"# import sys; input = sys.stdin.buffer.readline722# sys.setrecursionlimit(10**7)723from collections import defaultdict724mod = 10 ** 9 + 7; INF = float(""inf"")725 726def getlist():727	return list(map(int, input().split()))728 729def inverse(N, mod):730	return (pow(N, mod - 2, mod))731 732def main():733	N = int(input())734	L = []735	for i in range(N):736		D1, D2 = getlist()737		if D1 == D2:738			L.append(1)739		else:740			L.append(0)741 742	for i in range(N - 2):743		if L[i] + L[i + 1] + L[i + 2] == 3:744			print(""Yes"")745			return746 747	print(""No"")748 749 750 751 752if __name__ == '__main__':753	main()"754p02547,s791743981,Accepted,"N=int(input())755sum=0756ans=""No""757for i in range(N):758    d=list(map(int,input().split()))759    if d[0]==d[1]:760        sum+=1761        if sum>2:762            ans=""Yes""763            break764    else:765        sum=0766print(ans)"767p02547,s543347343,Accepted,"import sys768S = int(input())769xy = [map(int, input().split()) for _ in range(S)]770x, y = [list(i) for i in zip(*xy)]771count = 0772 773for i in range(S):774  if x[i] == y[i]:775    count += 1776    if count == 3:777      print(""Yes"")778      sys.exit()779    else:780      pass781  else:782    count = 0783print(""No"")"784p02547,s190785365,Accepted,"n = int(input())785 786dices = []787 788successive_cnt = 0789 790for i in range(n):791    d, e = [int(x) for x in input().split(' ')]792 793    if d == e:794        successive_cnt += 1795    else:796        successive_cnt = 0797 798    if successive_cnt == 3:799        break800 801if successive_cnt == 3:802    print('Yes')803else:804    print('No')"805p02547,s923062211,Accepted,"N = int(input())806D = [list(map(int, input().split())) for i in range(N)]807for i in range(N-2):808    if D[i][0] == D[i][1]:809        if D[i+1][0] == D[i+1][1] and D[i+2][0] == D[i+2][1]:810            print('Yes')811            exit()812print('No')"813p02547,s826086455,Accepted,"N = int(input())814D = [list(map(int, input().split())) for _ in range(N)]815 816ans = ""No""817cnt = 0818 819for i in range(N):820    if len(set(D[i])) == 1:821        cnt += 1822    else:823        cnt = 0824    825    if cnt >= 3:826        ans = ""Yes""827 828print(ans)"829p02547,s758354257,Accepted,"L=0830N=int(input())831for i in range(N):832  a,b=map(int,input().split())833  if a==b:834    L+=1835    if L==3:836      print(""Yes"")837      exit()838  else:839    L=0840print(""No"")"841p02547,s088278562,Accepted,"# coding: utf-8842 843def main():844    n = int(input())845    count = 0846    for _ in range(n):847        d1, d2 = map(int, input().split())848        if d1 == d2:849            count += 1850        else:851            count = 0852        if count >= 3:853            print('Yes')854            return855    print('No')856    857main()858 859"860p02547,s718515338,Accepted,"N = int(input())861number = [0]*N862for i in range(N):863    a,b = map(int,input().split())864    if a==b:865        number[i]=1866 867for i in range(N-2):868    if number[i]==1 and number[i+1]==1 and number[i+2]==1:869        print(""Yes"")870        exit(0)871 872print(""No"")873"874p02547,s287810989,Accepted,"#coding:utf-8875 876N = int(input())877 878D = []879 880for i in range(N):881    d1,d2 = map(int,input().split())882 883    D.append(d1==d2)884    885for i in range(N-2):886    if D[i] and D[i+1] and D[i+2]:887        print(""Yes"")888        break889 890    if i == N-3:891        print(""No"")"892p02547,s396007019,Accepted,"n = int(input())  # nは入力回数893num_list = [list(map(int, input().split())) for _ in range(n)]894ans = ""No""895 896for i in range(n-2):897    if num_list[i][0] == num_list[i][1] and num_list[i+1][0] == num_list[i+1][1] and num_list[i+2][0] == num_list[i+2][1]:898        ans = ""Yes""899 900print(ans)"901p02547,s355127878,Accepted,"N = int(input())902 903now = 0904 905ans = ""No""906 907for i in range(N):908  D1, D2 = map(int, input().split())909  if D1 == D2: now += 1910  else: now = 0911  if now == 3:912    ans = ""Yes""913    break914 915print(ans)"916p02547,s792549085,Accepted,"N = int(input())917 918count = 0919flag = False920for i in range(N):921  D1, D2 = map(int, input().split())922  if D1 == D2:923    count += 1924  else:925    count = 0926  if count == 3:927    flag = True928 929if flag:930  print(""Yes"")931else:932  print(""No"")"933p02547,s827435553,Accepted,"n=int(input())934arr=[]935for i in range(n):936	arr.append(list(map(int,input().split())))937flag=0938for i in range(n-2):939	if(arr[i][0]==arr[i][1] and arr[i+1][0]==arr[i+1][1] and arr[i+2][0]==arr[i+2][1]):940		flag=1941		print(""Yes"")942		break943if(flag==0):944	print(""No"")"945p02547,s058759886,Accepted,"c=0946for _ in range(int(input())):947    a,b=map(int,input().split())948    if a==b:949        c+=1950        if c==3:951            print(""Yes"")952            break953    else:954        c=0955else:956    print(""No"")"957p02547,s862118392,Accepted,"n = int(input())958a = []959for i in range(n):960    l,m = map(int,input().split())961    a.append([l,m])962f = 0963for i in range(n-2):964    if a[i][0] == a[i][1] and a[i+1][0] == a[i+1][1] and a[i+2][0] == a[i+2][1]:965        f = 1966if f == 0:967    print('No')968else:969    print('Yes')970"971p02547,s493692217,Accepted,"count = 0972for i in range(int(input())):973    l = list(map(int, input().split()))974    if l[0] == l[1]:975        count += 1976    elif l[0] != l[1]:977        count = 0978    if count >= 3:979        print(""Yes"")980        break981if count < 3:982    print(""No"")983"984p02547,s294504776,Accepted,"N = int(input())985D = [False for _ in range(N)]986for i in range(N):987    x, y = map(int, input().split())988    if x == y:989        D[i] = True990tmp = 0991for i in range(N - 2):992    if D[i] == D[i + 1] == D[i + 2] == True:993        print('Yes')994        break995else:996    print('No')"997p02547,s547707347,Accepted,"n = int(input())998def count():999    count = 01000    result = ''1001    for i in range(n):1002        d1, d2 = map(int, input().split())1003        if result == 'Yes':1004            continue1005        if d1 == d2:1006            count += 11007            if count == 3:1008                result = 'Yes'1009        else:1010            count = 01011            result = 'No'1012    return result1013 1014print(count()) "1015p02547,s133499973,Accepted,"n = int(input())1016d = [list( map( int, input().split() ) ) for i in range(n)]1017 1018for i in range(n-2):1019  if d[i][0] == d[i][1]:1020    if d[i+1][0] ==d[i+1][1]:1021      if d[i+2][0] == d[i+2][1]:1022        print('Yes')1023        exit()1024print('No')"1025p02547,s174961295,Accepted,"import time1026from math import ceil1027from collections import defaultdict, deque1028 1029 1030def A(s):1031  if s[-1] == 's':1032    return s + 'es'1033  return s + 's'1034 1035 1036def B(n, d):1037  for i in range(n - 2):1038    if (d[i][0] == d[i][1] and d[i + 1][0] == d[i + 1][1] and1039        d[i + 2][0] == d[i + 2][1]):1040      return 'Yes'1041  return 'No'1042 1043 1044def main():1045  n = int(input())1046  d = [list(map(int, input().split())) for i in range(n)]1047  print(B(n, d))1048 1049 1050if __name__ == '__main__':1051  main()1052"1053p02547,s904168178,Accepted,"N = int(input())1054D = [list(map(int,input().split())) for _ in range(N)]1055 1056ans = 01057 1058for i in range(N-2):1059    if D[i][0] == D[i][1] and D[i+1][0] == D[i+1][1] and D[i+2][0] == D[i+2][1]:1060        ans += 11061    else:1062        ans += 01063        1064if ans >= 1:1065    print(""Yes"")1066else:1067    print(""No"")1068"1069p02547,s876529582,Accepted,"n = int(input())1070cnt = 01071ok = False1072for _ in range(n):1073    x, y = map(int, input().split())1074    if x == y:1075        cnt += 11076        if cnt >= 3:1077            ok = True1078    else:1079        cnt = 01080print('Yes' if ok else 'No')1081"1082p02547,s320932694,Accepted,"N = int(input())1083 1084D = []1085for i in range(N):1086    Da,Db = (map(int,input().split()))1087    if Da == Db:1088        D.append(1)1089    else:1090        D.append(0)1091 1092for i in range(N-2):1093    if D[i]==1 and D[i+1] == 1 and D[i+2] == 1:1094        ans = ""Yes""1095        break1096    else:1097        ans = ""No""1098print(ans)"1099p02547,s815704259,Accepted,"N = int(input())1100 1101count = 01102ans = ""No""1103for i in range(N):1104    d1,d2 = map(int,input().split())1105    if d1 == d2:1106        count += 11107        if count == 3:1108            ans = ""Yes""1109    else:1110        count = 01111print(ans)"1112p02547,s904897320,Accepted,"n = int(input())1113cnt = 01114for i in range(n):1115    a, b = map(int, input().split())1116    if a == b: 1117        cnt += 11118    else:1119        cnt = 01120    if cnt >= 3:1121        print(""Yes"")1122        break1123    if cnt < 3 and i == n-1:1124        print(""No"")"1125p02547,s112789857,Accepted,"n=int(input())1126l=[list(map(int,input().split())) for _ in range(n)]1127for i in range(n-2):1128  if l[i][0]==l[i][1] and l[i+1][0]==l[i+1][1] and l[i+2][0]==l[i+2][1]:1129    print('Yes')1130    exit()1131print('No')1132               "1133p02547,s599305372,Accepted,"n = int(input())1134cnt = 01135flag = 01136for i in range(n):1137    d1, d2 = map(int, input().split())1138    if d1 == d2:1139        cnt += 11140        if cnt == 3:1141            flag = 11142            break1143    else:1144        cnt = 01145 1146if flag == 0:1147    print('No')1148else:1149    print('Yes')1150        "1151p02547,s844531437,Accepted,"N = int(input())1152zoro = []1153for _ in range(N):1154    a, b = map(int, input().split())1155    zoro.append(a == b)1156 1157for i in range(N - 2):1158    if zoro[i] and zoro[i + 1] and zoro[i + 2]:1159        print(""Yes"")1160        exit()1161        1162print(""No"")"1163p02547,s934151668,Accepted,"n = int(input())1164results = [list(map(int, input().split())) for _ in range(n)]1165ans = 01166 1167for i in range(n):1168    if ans >= 3:1169        break1170    if results[i][0] == results[i][1]:1171        ans += 11172    else:1173        ans = 01174if ans >= 3:1175    print(""Yes"")1176else:1177    print(""No"")1178"1179p02547,s670451733,Accepted,"N = int(input())1180D = [input().split() for i in range(N)]1181ans = 01182for i in range(N-2):1183    if D[i][0] == D[i][1]:1184        if D[i+1][0] == D[i+1][1]:1185            if D[i+2][0] == D[i+2][1]:1186                ans = 11187                break1188if ans == 0:1189    print('No')1190else:1191    print('Yes')"1192p02547,s706497773,Accepted,"num = int(input())1193count = 01194for i in range(num):1195  ab = input().split("" "")1196  a = int(ab[0])1197  b = int(ab[1])1198  if a == b:1199    count += 11200    if count >= 3:

Showing the first 1,200 of 116880 lines. Download the file for the rest.