File tree Expand file tree Collapse file tree 1 file changed +13
-13
lines changed
Expand file tree Collapse file tree 1 file changed +13
-13
lines changed Original file line number Diff line number Diff line change 11def main ():
22 t = int (raw_input ())
33 while t :
4- t -= 1
5- n = map (int ,raw_input ().split ())
4+ t -= 1
5+ n = map (int , raw_input ().split ())
66 q = n [1 ]
77 n = n [0 ]
88 queries = []
@@ -16,38 +16,38 @@ def main():
1616 queries .append (a )
1717 queries .sort ()
1818 for i in queries :
19- if (i [0 ]== i [1 ] and i [2 ]== 1 ):
19+ if (i [0 ] == i [1 ] and i [2 ] == 1 ):
2020 ans = 0
2121 break
22- elif (i [0 ]== i [1 ] and i [2 ]== 0 ):
22+ elif (i [0 ] == i [1 ] and i [2 ] == 0 ):
2323 continue
2424 else :
25- if (good [i [0 ]]== 'a' and good [i [1 ]]== 'a' ):
25+ if (good [i [0 ]] == 'a' and good [i [1 ]] == 'a' ):
2626 if (i [2 ]== 1 ):
2727 good [i [0 ]] = 1
2828 good [i [1 ]] = 0
2929 else :
3030 good [i [0 ]] = 0
3131 good [i [1 ]] = 0
32- elif (good [i [0 ]]!= 'a' and good [i [1 ]]== 'a' ):
33- if (good [i [0 ]]== 1 ):
34- if (i [2 ]== 1 ):
32+ elif (good [i [0 ]] != 'a' and good [i [1 ]] == 'a' ):
33+ if (good [i [0 ]] == 1 ):
34+ if (i [2 ] == 1 ):
3535 good [i [1 ]] = 0
3636 else :
3737 good [i [1 ]] = 1
3838 else :
39- if (i [2 ]== 1 ):
39+ if (i [2 ] == 1 ):
4040 good [i [1 ]] = 1
4141 else :
4242 good [i [1 ]] = 0
43- elif (good [i [0 ]]== 'a' and good [i [1 ]]!= 'a' ):
44- if (good [i [1 ]]== 1 ):
45- if (i [2 ]== 1 ):
43+ elif (good [i [0 ]] == 'a' and good [i [1 ]] != 'a' ):
44+ if (good [i [1 ]] == 1 ):
45+ if (i [2 ] == 1 ):
4646 good [i [0 ]] = 0
4747 else :
4848 good [i [0 ]] = 1
4949 else :
50- if (i [2 ]== 1 ):
50+ if (i [2 ] == 1 ):
5151 good [i [0 ]] = 1
5252 else :
5353 good [i [0 ]] = 0
You can’t perform that action at this time.
0 commit comments