{"problem":{"name":"08. Labyrinth-8","description":{"content":"See the problem statement here: [http://codeforces.com/contest/921/problem/01](//codeforces.com/contest/921/problem/01).","description_type":"Markdown"},"platform":"Codeforces","limit":{"time_limit":8000,"memory_limit":524288},"difficulty":"None","is_remote":true,"is_sync":true,"sync_url":null,"sign":"CF92108"},"statements":[{"statement_type":"Markdown","content":"See the problem statement here: [http://codeforces.com/contest/921/problem/01](//codeforces.com/contest/921/problem/01).\n\n[samples]","is_translate":false,"language":"English"},{"statement_type":"Markdown","content":"请参见问题描述：http://codeforces.com/contest/921/problem/01。\n\n[samples]","is_translate":true,"language":"Chinese"},{"statement_type":"Markdown","content":"**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 $**.","is_translate":false,"language":"Formal"}],"meta":{"iden":"CF92108","tags":[],"sample_group":[],"created_at":"2026-03-03 11:00:39"}}