{"problem":{"name":"A. Help Victoria the Wise","description":{"content":"Vasilisa the Wise from a far away kingdom got a present from her friend Helga the Wise from a farther away kingdom. The present is a surprise box, yet Vasilisa the Wise doesn't know yet what the surpr","description_type":"Markdown"},"platform":"Codeforces","limit":{"time_limit":1000,"memory_limit":262144},"difficulty":"None","is_remote":true,"is_sync":true,"sync_url":null,"sign":"CF98A"},"statements":[{"statement_type":"Markdown","content":"Vasilisa the Wise from a far away kingdom got a present from her friend Helga the Wise from a farther away kingdom. The present is a surprise box, yet Vasilisa the Wise doesn't know yet what the surprise actually is because she cannot open the box. She hopes that you can help her in that.\n\nThe box's lock is constructed like that. The box itself is represented by an absolutely perfect black cube with the identical deepening on each face (those are some foreign nanotechnologies that the far away kingdom scientists haven't dreamt of). The box is accompanied by six gems whose form matches the deepenings in the box's faces. The box can only be opened after it is correctly decorated by the gems, that is, when each deepening contains exactly one gem. Two ways of decorating the box are considered the same if they can be obtained one from the other one by arbitrarily rotating the box (note that the box is represented by a perfect nanotechnological cube)\n\nNow Vasilisa the Wise wants to know by the given set of colors the following: in how many ways would she decorate the box in the worst case to open it? To answer this question it is useful to know that two gems of one color are indistinguishable from each other. Help Vasilisa to solve this challenging problem.\n\n## Input\n\nThe first line contains exactly 6 characters without spaces from the set {_R_, _O_, _Y_, _G_, _B_, _V_} — they are the colors of gems with which the box should be decorated.\n\n## Output\n\nPrint the required number of different ways to decorate the box.\n\n[samples]","is_translate":false,"language":"English"},{"statement_type":"Markdown","content":"来自遥远王国的智慧女巫瓦西莉莎收到了来自更遥远王国的朋友海伦娜的礼物。这是一盒惊喜盒，但瓦西莉莎还不知道惊喜究竟是什么，因为她打不开盒子。她希望你能帮助她解决这个问题。\n\n盒子的锁是这样构造的：盒子本身是一个绝对完美的黑色立方体，每个面上都有一个相同的凹槽（这是遥远王国的科学家们尚未梦想到的外星纳米技术）。盒子配有六颗宝石，其形状与盒子各面的凹槽完全匹配。只有当每个凹槽中恰好放入一颗宝石时，盒子才能被打开。如果两种装饰方式可以通过任意旋转盒子相互得到，则认为它们是相同的（注意，盒子是一个完美的纳米技术立方体）。\n\n现在，瓦西莉莎想知道：给定一组颜色，她最坏情况下需要尝试多少种不同的方式才能打开盒子？为了回答这个问题，需要注意的是，同一种颜色的两颗宝石是无法区分的。请帮助瓦西莉莎解决这个具有挑战性的问题。\n\n第一行包含恰好 #cf_span[6] 个来自集合 {_R_, _O_, _Y_, _G_, _B_, _V_} 的无空格字符——它们是用于装饰盒子的宝石的颜色。\n\n请输出装饰盒子的不同方式的数目。\n\n## Input\n\n第一行包含恰好 #cf_span[6] 个来自集合 {_R_, _O_, _Y_, _G_, _B_, _V_} 的无空格字符——它们是用于装饰盒子的宝石的颜色。\n\n## Output\n\n请输出装饰盒子的不同方式的数目。\n\n[samples]","is_translate":true,"language":"Chinese"},{"statement_type":"Markdown","content":"**Definitions**  \nLet $ C = \\{c_1, c_2, \\dots, c_6\\} $ be a multiset of 6 colors, where each $ c_i \\in \\{\\text{R}, \\text{O}, \\text{Y}, \\text{G}, \\text{B}, \\text{V}\\} $.  \nLet $ G $ be the rotation group of the cube, with $ |G| = 24 $.  \n\n**Constraints**  \n- Each color corresponds to a gem; gems of the same color are indistinguishable.  \n- The cube has 6 faces; each face receives exactly one gem.  \n\n**Objective**  \nCompute the number of distinct colorings of the cube’s faces under rotational symmetry, given the multiset $ C $:  \n$$\n\\frac{1}{24} \\sum_{g \\in G} \\text{Fix}(g)\n$$  \nwhere $ \\text{Fix}(g) $ is the number of colorings fixed by rotation $ g $, computed via Burnside’s lemma, considering multiplicities of colors in $ C $.","is_translate":false,"language":"Formal"}],"meta":{"iden":"CF98A","tags":["brute force","implementation"],"sample_group":[["YYYYYY","1"],["BOOOOB","2"],["ROYGBV","30"]],"created_at":"2026-03-03 11:00:39"}}