{"raw_statement":[{"iden":"statement","content":"See the problem statement here: [http://codeforces.com/contest/921/problem/01](//codeforces.com/contest/921/problem/01)."}],"translated_statement":[{"iden":"statement","content":"请参见问题描述：http://codeforces.com/contest/921/problem/01。\n\n"}],"sample_group":[],"show_order":[],"formal_statement":"**Definitions**  \nLet $ n \\in \\mathbb{Z} $ be the number of rooms.  \nLet $ a = (a_1, a_2, \\dots, a_n) $ be a sequence of integers, where $ a_i \\in \\{0, 1\\} $ indicates whether room $ i $ is lit ($ 1 $) or unlit ($ 0 $).\n\n**Constraints**  \n1. $ 1 \\le n \\le 10^5 $  \n2. $ a_i \\in \\{0, 1\\} $ for all $ i \\in \\{1, \\dots, n\\} $\n\n**Objective**  \nFind the minimum number of moves to turn off all lights, where a move consists of selecting a room $ i $ with $ a_i = 1 $, and toggling the state of all rooms in the interval $ [i - a_i + 1, i + a_i - 1] $ (clamped to $ [1, n] $).  \n\nNote: Since $ a_i \\in \\{0,1\\} $, selecting a room $ i $ with $ a_i = 1 $ toggles only room $ i $.  \nThus, the problem reduces to: **Count the number of rooms with $ a_i = 1 $**.","simple_statement":null,"has_page_source":false}