<s> """<STR_LIT>""" <EOL> __author__ = '<STR_LIT>' <EOL> class Solution ( object ) : <EOL> def solve ( self , cipher ) : <EOL> """<STR_LIT>""" <EOL> N , A = cipher <EOL> f = [ <NUM_LIT:0> for _ in xrange ( N + <NUM_LIT:1> ) ] <EOL> for i in xrange ( <NUM_LIT:1> , N + <NUM_LIT:1> ) : <EOL> f [ i ] = f [ i - <NUM_LIT:1> ] + A [ i - <NUM_LIT:1> ] <EOL> for i in xrange ( N ) : <EOL> if f [ i ] == f [ N ] - f [ i + <NUM_LIT:1> ] : <EOL> return "<STR_LIT>" <EOL> return "<STR_LIT>" <EOL> if __name__ == "<STR_LIT:__main__>" : <EOL> import sys <EOL> f = open ( "<STR_LIT>" , "<STR_LIT:r>" ) <EOL> solution = Solution ( ) <EOL> testcases = int ( f . readline ( ) . strip ( ) ) <EOL> for t in xrange ( testcases ) : <EOL> N = int ( f . readline ( ) . strip ( ) ) <EOL> A = map ( int , f . readline ( ) . strip ( ) . split ( '<STR_LIT:U+0020>' ) ) <EOL> cipher = N , A <EOL> s = "<STR_LIT>" % ( solution . solve ( cipher ) ) <EOL> print s , </s>
