{"code":"countsubarray","name":"Đếm dãy con","description":"Cho dãy $N$ số nguyên dương $a_i$. Đếm số cách chia dãy đã cho thành các đoạn liên tiếp sao cho tổng các phần tử mỗi đoạn từ đoạn thứ hai trở đi thì bằng nhau.\r\n\r\n<h4>Input</h4>\r\n\r\n- Dòng đầu tiên chứa $N$ ($1 \\le N \\leq 2 \\cdot 10^5$)\r\n- Dòng thứ hai chứa $N$ số $a_i$ ($1 \\le a_i \\le 4\\cdot 10^5, a_1 + a_2 + ... + a_N \\le 4\\cdot 10^5$)\r\n\r\n\r\n<h4>Output</h4>\r\n\r\n- Đưa ra số cách chia.\r\n\r\n<h4>Example</h4>\r\n\r\n!!! question \"Test 1\"\r\n\r\n    ???+ \"Input\"\r\n\r\n        ```sample\r\n        5\r\n        1 1 2 1 1\r\n        ```\r\n\r\n    ???+ success \"Output\"\r\n\r\n        ```sample\r\n        6\r\n        ```","points":300.0,"partial":true,"time_limit":1.0,"memory_limit":262144,"short_circuit":false,"allowed_languages":[3,4,34,36,37,5,6,11,12,14,28,2,38,39,9,18,17,29,23,27,35,25,26,10,7,19,32,1,8,15,16,24,20,33,13,41,21,40],"is_public":true,"is_manually_managed":false,"permissions":{"can_edit":false}}