Answered step by step
Verified Expert Solution
Question
1 Approved Answer
my answer is the top two photos and below are the question and instructions, after submitting my answer, there are 2 over 19 of them
my answer is the top two photos and below are the question and instructions, after submitting my answer, there are 2 over 19 of them are 'runtime error' and another 2 are 'time limit exceeded'. i would like to know how to solve it. Thankyou.
test.py La AL EXPLORER Welcome 1.py . test3.py test2.py test1.py V OPEN EDITORS 1 UNSAVED 1.py Welcome 1 def solution(A): 2 X=len(All) . 1.py 3 Y=len(A) test3.py 4 XX=[] test2.py 5 YY=[] test1.py 6 XY 7 test.py for j in range(Y): for i in range(x): > DESKTOP 9 adding the columns and check if they are equal > QUTLINE 10 if i==Q: #check for the points in the first column 11 addx- 12 for a in range(Y): 13 for bin range(1,x): 14 addx+=(A[a][b]) 15 if addx==Q: 16 XX.append{(1,1)) 17 clse: 18 pass 19 elif i==(x-1): check for the points in the last calumn 28 addx=0 21 for a in range(Y): 22 for b in range(x-1): 23 addx+=A[a][b] 24 if addx==: 25 xx.append((1.))) ) 26 else: 27 pass 28 else: # check for other points 29 addxl= 39 addx2= 31 for a in range(Y): 32 for bin range(i): 33 addxl+=A[a] [b] 34 for b in range(1+1,x): 35 addx2+=A[a][b] 36 if addxleraddx2: 37 XX.appendili,j]) 38 else: 39 pass 48 #adding the rows and check whether they are equal 41 if j=-6: #check for the points in the first row 42 addy=8 43 for a in range(1,Y): for b in range(x): 45 addy+A[a] [b] if addy. @DAO > Launch Chrome against localhost (Desktop) Ln 74, Col 60 Spaces: 4 UTF-8 LF Python x Welcome 1.py e test3.py test2.py test1.py test.py 1.py EXPLORER V OPEN EDITORS 1 UNSAVED Welcome . 1.py test3.py test2.py test1.py test.py > DESKTOP > QUTLINE 46 47 4A 49 La AL 50 51 52 53 54 55 56 57 5A 59 68 61 62 63 64 65 66 67 68 69 78 71 72 73 74 75 76 77 78 79 80 81 82 B3 34 duuyt ALL if addy==: YY.append([i,j]) else: pass elif j=={Y-1): check for the points in the last row addy for a in range(Y-1): for b in range(X): addy+=A[a] [b] if addy==: YY.append((1.])) else: pass else: & check for other points addyl= addy2-6 for a in rangelj): for b in range(x): addylu=A[a] [b] for a in rangel]+1,Y): for b in range(X): addy2 Alallbl if addy1==addy2: YY.append((1,1)) else: pass for i in XX: # check if there are points in XX and YY are same if YY.count(i)==1: XY+=1 # count the number of points that is same else: pass return XY if _name__ == "_main__": q = [[int i) for i in j.split(';')] for j in input().split('_' print solutioniq)) DAO > Launch Chrome against localhost (Desktop) Ln 74, Col 60 Spaces: 4 UTF-8 LF Python Equi2D Count Description A non-empty zero-indexed matrix A consisting of N rows and M columns of integers is given. A pair (P, Q) is called an equilibriu mpoint of matrix Aif the following conditions are met: OSPStep by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started