000 — CSEC CPD KICKOFF Contest — (DIV 1) — Editorial

Revision en13, by porcif, 2024-10-16 00:05:25

A. Garland

Note that there are only a few configuration classes: 1111, 1112, 1122, 1123 and 1234. Let's discuss each of them.

If all 4 bulbs are of the same color, then it is impossible to turn all the bulbs on, because after you switch one light bulb, it is impossible to turn the others on.

If there is a color with 3 bulbs, then it is impossible to turn all the bulbs on in 4 operations, which means there is a bulb that turns on, turns off and then turns on again, i.e. the answer is at least 6 operations. And there is a sequence of exactly 6 operations (such an example was shown in the problem notes).

For configurations like 1122 and 1123, it is enough to turn on the 1 color bulbs not in a row (i.e. in order [1,2,1,2] for the first case and [1,2,1,3] for the second one). So the answer for such configurations is 4 .

If all the bulbs are of different colors, then nothing prevents you from turning them all on in 4 operations.

Tags csec_astu, codeforces

History

 
 
 
 
Revisions
 
 
  Rev. Lang. By When Δ Comment
en48 English porcif 2024-10-17 16:46:48 2 Tiny change: '\n[here](htt' -> '[here](htt'
en47 English porcif 2024-10-17 16:45:19 138
en46 English porcif 2024-10-17 16:38:51 0 (published)
en45 English porcif 2024-10-17 16:30:51 2376
en44 English porcif 2024-10-17 16:30:37 4960 Reverted to en42
en43 English porcif 2024-10-17 16:15:47 4960
en42 English porcif 2024-10-17 14:39:39 5
en41 English porcif 2024-10-17 14:38:12 430
en40 English porcif 2024-10-17 14:23:52 38
en39 English porcif 2024-10-17 14:22:59 846
en38 English porcif 2024-10-17 14:02:29 3 Tiny change: 'oiler>\n\nCode by [u' -> 'oiler>\n\n- Code by [u'
en37 English porcif 2024-10-17 13:59:50 4
en36 English porcif 2024-10-17 13:59:19 9
en35 English porcif 2024-10-17 13:58:28 631
en34 English porcif 2024-10-17 13:35:07 1130
en33 English porcif 2024-10-17 13:04:38 56
en32 English porcif 2024-10-17 13:03:12 30
en31 English porcif 2024-10-17 13:01:34 678
en30 English porcif 2024-10-16 23:40:21 12 Tiny change: ' summary="Code">\n\nOnce' -> ' summary="Tutorial">\n\nOnce'
en29 English porcif 2024-10-16 23:38:06 820
en28 English porcif 2024-10-16 23:11:11 350
en27 English porcif 2024-10-16 23:01:10 22
en26 English porcif 2024-10-16 23:00:37 418
en25 English porcif 2024-10-16 01:31:34 5
en24 English porcif 2024-10-16 01:30:57 1 Tiny change: 'that:\n1. The Eucli' -> 'that:\n1. The Eucli'
en23 English porcif 2024-10-16 01:30:09 37 Tiny change: 'em">\n\n\n\n### **Problem Understanding**\n\nThe ta' -> 'em">\n\n\nThe ta'
en22 English porcif 2024-10-16 01:29:32 930
en21 English porcif 2024-10-16 00:43:22 3 Tiny change: 'r \n```\n9\n1 3 3 6 ' -> 'r \n```\n1 3 3 6 '
en20 English porcif 2024-10-16 00:42:51 29
en19 English porcif 2024-10-16 00:40:05 93
en18 English porcif 2024-10-16 00:37:08 866
en17 English porcif 2024-10-16 00:33:15 2654
en16 English porcif 2024-10-16 00:21:37 15
en15 English porcif 2024-10-16 00:19:18 1459
en14 English porcif 2024-10-16 00:07:47 45
en13 English porcif 2024-10-16 00:05:25 958
en12 English porcif 2024-10-16 00:01:27 4 Tiny change: '[A. Garlan' -> '### [A. Garlan'
en11 English porcif 2024-10-16 00:01:09 11
en10 English porcif 2024-10-16 00:00:52 5 Tiny change: '#### [A —' -> '[A —'
en9 English porcif 2024-10-16 00:00:38 2 Tiny change: '#### **[A — Garland](' -> '#### [A - Garland]('
en8 English porcif 2024-10-16 00:00:17 1 Tiny change: '#### **[A — Garland](' -> '#### **[A - Garland]('
en7 English porcif 2024-10-16 00:00:03 9 Tiny change: '#### **[Problem A — G' -> '#### **[A — G'
en6 English porcif 2024-10-15 23:59:36 16
en5 English porcif 2024-10-15 23:57:17 4
en4 English porcif 2024-10-15 23:57:04 67
en3 English porcif 2024-10-15 23:56:12 83
en2 English porcif 2024-10-15 23:55:53 63
en1 English porcif 2024-10-15 23:54:42 82 Initial revision (saved to drafts)