{"push_id":2720745094,"size":1,"distinct_size":1,"ref":"refs/heads/master","head":"b59b40a08c74fba949cde03abe02a889a5dc5ad0","before":"78b5dc302ff4bd1d74d1d4bfd854105d18cad88b","commits":[{"sha":"b59b40a08c74fba949cde03abe02a889a5dc5ad0","author":{"name":"jeetendraswami5","email":"3a4984714b414fd6a7c262c26cfd2402e7633f7b@users.noreply.github.com"},"message":"Create Modify Sequence\n\nSuppose we have a sequence of non-negative integers, Namely a_1, a_2, ... ,a_n. At each time we can choose one term a_i with 0 < i < n and we subtract 1 from both a_i and a_i+1. We wonder whether we can get a sequence of all zeros after several operations.\r\n\r\nInput\r\n\r\nThe first line of test case is a number N. (0 < N <= 10000) The next line is N non-negative integers, 0 <= a_i <= 109\r\n\r\nOutput\r\n\r\nIf it can be modified into all zeros with several operations output “YES” in a single line, otherwise output “NO” instead.\r\n\r\nSAMPLE INPUT \r\n2\r\n1 2\r\nSAMPLE OUTPUT \r\nNO\r\nExplanation\r\nIt is clear that [1 2] can be reduced to [0 1] but no further to convert all integers to 0. Hence, the output is NO.\r\n\r\nConsider another input for more clarification:\r\n\r\n2\r\n2 2\r\n\r\nOutput is YES as [2 2] can be reduced to [1 1] and then to [0 0] in just two steps.","distinct":true,"url":"https://api.github.com/repos/jeetendraswami5/Datastructure/commits/b59b40a08c74fba949cde03abe02a889a5dc5ad0"}]}
{"actor":{"display_login":"jeetendraswami5"}}