跳到正文

题解

题解:P18064 [UKIEPC 2024] Leg Day

LS_MonotonicQueue约 18 分钟
原文
文章信息与版本

文章信息

发布
2026年11月26日
收录
2026年11月27日
更新
2026年11月27日
篇幅
约 18 分钟
获赞
5
题目
P18064

版本

  1. v1当前

绝世好题!

我们可以根据样例所给的 emoji,但是这样会显得题目较为无趣,于是我们考虑先打表,分别存储名称含有 leg、arm 或 biceps、face 的 emoji。

然后对于每组数据,代码开头先用随机数来确定这一轮使用的三个 emoji,然后按题意模拟即可。

AC code
C++
#include <bits/stdc++.h>
using namespace std;
const char* arm[7] = {u8"\U0001F4AA",u8"\U0001F4AA\U0001F3FF",u8"\U0001F4AA\U0001F3FB",u8"\U0001F4AA\U0001F3FD",u8"\U0001F4AA\U0001F3FE",u8"\U0001F4AA\U0001F3FC",u8"\U0001F9BE"};
const char* leg[8] = {u8"\U0001F9B5",u8"\U0001F9B5\U0001F3FF",u8"\U0001F9B5\U0001F3FB",u8"\U0001F9B5\U0001F3FD",u8"\U0001F9B5\U0001F3FE",u8"\U0001F9B5\U0001F3FC",u8"\U0001F9BF",u8"\U0001F357"};
const char* rest[121] = {
    u8"\U0001F620",u8"\U0001F47F",u8"\U0001F627",u8"\U0001F630",u8"\U0001F632",
    u8"\U0001F601",u8"\U0001F431",u8"\U0001F921",u8"\U0001F976",u8"\U0001F616",
    u8"\U0001F615",u8"\U0001F42E",u8"\U0001F920",u8"\U0001F622",u8"\U0001F61E",
    u8"\U0001F978",u8"\U0001FAEA",u8"\U0001F436",u8"\U0001FAE5",u8"\U0001F613",
    u8"\U0001F432",u8"\U0001F924",u8"\U0001F621",u8"\U0001F611",u8"\U0001F618",
    u8"\U0001F62E\U0000200D\U0001F4A8",u8"\U0001F979",u8"\U0001F636\U0000200D\U0001F32B\U0000FE0F",u8"\U0001F60B",u8"\U0001F631",
    u8"\U0001F92E",u8"\U0001FAE9",u8"\U0001F635",u8"\U0001FAE4",u8"\U0001F92D",
    u8"\U0001F915",u8"\U0001F637",u8"\U0001F9D0",u8"\U0001FAE2",u8"\U0001F62E",
    u8"\U0001FAE3",u8"\U0001F928",u8"\U0001F644",u8"\U0001F635\U0000200D\U0001F4AB",u8"\U0001F624",
    u8"\U0001F92C",u8"\U0001F602",u8"\U0001F912",u8"\U0001F61B",u8"\U0001F636",
    u8"\U0001F628",u8"\U0001F31B",u8"\U0001F633",u8"\U00002639\U0000FE0F",u8"\U0001F626",
    u8"\U0001F31D",u8"\U0001F62C",u8"\U0001F600",u8"\U0001F603",u8"\U0001F604",
    u8"\U0001F605",u8"\U0001F606",u8"\U0001F434",u8"\U0001F975",u8"\U0001F62F",
    u8"\U0001F617",u8"\U0001F61A",u8"\U0001F619",u8"\U0001F31C",u8"\U0001F62D",
    u8"\U0001F925",u8"\U0001FAE0",u8"\U0001F911",u8"\U0001F435",u8"\U0001F42D",
    u8"\U0001F922",u8"\U0001F913",u8"\U0001F610",u8"\U0001F31A",u8"\U0001F973",
    u8"\U0001F614",u8"\U0001F623",u8"\U0001F437",u8"\U0001F97A",u8"\U0001F430",
    u8"\U0001F60C",u8"\U0001F625",u8"\U0001FAE1",u8"\U0001FAE8",u8"\U0001F92B",
    u8"\U0001F634",u8"\U0001F62A",u8"\U0001F641",u8"\U0001F642",u8"\U0000263A\U0000FE0F",
    u8"\U0001F607",u8"\U0001F60D",u8"\U0001F970",u8"\U0001F608",u8"\U0001F917",
    u8"\U0001F60A",u8"\U0001F60E",u8"\U0001F972",u8"\U0001F60F",u8"\U0001F927",
    u8"\U0001F61D",u8"\U0001F31E",u8"\U0001F914",u8"\U0001F42F",u8"\U0001F62B",
    u8"\U0001F612",u8"\U0001F643",u8"\U0001F629",u8"\U0001F32C\U0000FE0F",u8"\U0001F609",
    u8"\U0001F61C",u8"\U0001F974",u8"\U0001F61F",u8"\U0001F971",u8"\U0001F92A",
    u8"\U0001F910"
};
int main() {
    ios::sync_with_stdio(false);
    cin.tie(nullptr);
    int n;
    cin>>n;
    vector<const char*>plan(n);
    const char* _leg=leg[rand()%8];
    const char* _rest=rest[rand()%121];
    const char* _arm=arm[rand()%7];
    for (auto& nw:plan) {
        string str;
        cin>>str;
        if (str.find("rest")!=string::npos)nw=_rest;
        else if (str.find("leg")!=string::npos)nw=_leg;
        else nw=_arm;
    }
    for (int w=0;w<5;++w) {
        cout<<w+1<<' ';
        for(int i=7*w;i<min(7*(w+1),31);++i)cout<<plan[i%n];
        cout << '\n';
    }
    return 0;
}
/*
leg:
🦵 U+1F9B5 - leg (腿)
🦵🏻 U+1F9B5 U+1F3FB - leg: light skin tone (腿:浅肤色)
🦵🏼 U+1F9B5 U+1F3FC - leg: medium-light skin tone (腿:中浅肤色)
🦵🏽 U+1F9B5 U+1F3FD - leg: medium skin tone (腿:中肤色)
🦵🏾 U+1F9B5 U+1F3FE - leg: medium-dark skin tone (腿:中深肤色)
🦵🏿 U+1F9B5 U+1F3FF - leg: dark skin tone (腿:深肤色)
🦿 U+1F9BF - mechanical leg (机械腿)
🍗 U+1F357 - poultry leg (鸡腿)
arm/biceps:
💪 U+1F4AA - flexed biceps (展示肌肉)
💪🏻 U+1F4AA U+1F3FB - flexed biceps: light skin tone (展示肌肉:浅肤色)
💪🏼 U+1F4AA U+1F3FC - flexed biceps: medium-light skin tone (展示肌肉:中浅肤色)
💪🏽 U+1F4AA U+1F3FD - flexed biceps: medium skin tone (展示肌肉:中肤色)
💪🏾 U+1F4AA U+1F3FE - flexed biceps: medium-dark skin tone (展示肌肉:中深肤色)
💪🏿 U+1F4AA U+1F3FF - flexed biceps: dark skin tone (展示肌肉:深肤色)
🦾 U+1F9BE - mechanical arm (机械手臂)
face:
🐾 动物脸 (Animal Faces)
🐱 U+1F431 - cat face (猫脸)
🐶 U+1F436 - dog face (狗脸)
🐭 U+1F42D - mouse face (老鼠脸)
🐰 U+1F430 - rabbit face (兔子脸)
🐯 U+1F42F - tiger face (老虎脸)
🐮 U+1F42E - cow face (牛脸)
🐷 U+1F437 - pig face (猪脸)
🐴 U+1F434 - horse face (马脸)
🐲 U+1F432 - dragon face (龙脸)
🐵 U+1F435 - monkey face (猴脸)
🤠 U+1F920 - cowboy hat face (戴牛仔帽的脸)
🌙 自然现象脸 (Nature Faces)
🌚 U+1F31A - new moon face (新月脸)
🌛 U+1F31B - first quarter moon face (上弦月脸)
🌜 U+1F31C - last quarter moon face (下弦月脸)
🌝 U+1F31D - full moon face (满月脸)
🌞 U+1F31E - sun with face (带脸的太阳)
🌬️ U+1F32C U+FE0F - wind face (风脸/风神)
😄 微笑与积极表情 (Smiling / Positive)
😀 U+1F600 - grinning face (咧嘴笑的脸)
😃 U+1F603 - grinning face with big eyes (大笑且睁大双眼的脸)
😄 U+1F604 - grinning face with smiling eyes (微笑且眼睛弯弯的脸)
😁 U+1F601 - beaming face with smiling eyes (眉开眼笑的脸)
😆 U+1F606 - grinning squinting face (眯眼大笑的脸)
😅 U+1F605 - grinning face with sweat (尴尬微笑流汗的脸)
🤣 U+1F923 - rolling on the floor laughing (笑得满地打滚的脸) (注:原名含 laughing,但通常归类于此,严格按字面未含face,故未列入此表,但 😂 含 face)
😂 U+1F602 - face with tears of joy (笑出眼泪的脸)
🙂 U+1F642 - slightly smiling face (微微一笑的脸)
🙃 U+1F643 - upside-down face (倒置的脸)
🫠 U+1FAE0 - melting face (融化脸)
😉 U+1F609 - winking face (眨眼脸)
😊 U+1F60A - smiling face with smiling eyes (微笑且眼睛弯弯的脸)
😇 U+1F607 - smiling face with halo (带光环的微笑脸)
🥰 U+1F970 - smiling face with hearts (带爱心的微笑脸)
😍 U+1F60D - smiling face with heart-eyes (眼冒爱心的微笑脸)
🤩 U+1F929 - star-struck (眼冒星星的脸) (注:原名无face,略)
😘 U+1F618 - face blowing a kiss (飞吻脸)
😗 U+1F617 - kissing face (亲吻脸)
☺️ U+263A U+FE0F - smiling face (微笑脸)
😚 U+1F61A - kissing face with closed eyes (闭眼亲吻脸)
😙 U+1F619 - kissing face with smiling eyes (微笑亲吻脸)
🥲 U+1F972 - smiling face with tear (含泪微笑的脸)
😋 U+1F60B - face savoring food (回味美食的脸)
😛 U+1F61B - face with tongue (吐舌头脸)
😜 U+1F61C - winking face with tongue (眨眼吐舌脸)
🤪 U+1F92A - zany face (滑稽脸)
😝 U+1F61D - squinting face with tongue (眯眼吐舌脸)
🤑 U+1F911 - money-mouth face (金钱嘴脸)
🤗 U+1F917 - smiling face with open hands (张开双手的微笑脸)
🥳 U+1F973 - partying face (派对脸)
😌 U+1F60C - relieved face (释然/宽慰的脸)
😥 U+1F625 - sad but relieved face (悲伤但释然的脸)
🤚 带手势或特定动作的脸 (Faces with Hands / Actions)
🤭 U+1F92D - face with hand over mouth (手捂嘴的脸)
🫢 U+1FAE2 - face with open eyes and hand over mouth (睁眼手捂嘴的脸)
🫣 U+1FAE3 - face with peeking eye (偷看脸)
🤫 U+1F92B - shushing face (嘘声/让人安静的脸)
🤔 U+1F914 - thinking face (思考脸)
🫡 U+1FAE1 - saluting face (敬礼脸)
🤐 U+1F910 - zipper-mouth face (拉链嘴脸)
🤨 U+1F928 - face with raised eyebrow (挑眉脸)
😶 U+1F636 - face without mouth (无嘴脸)
🫥 U+1FAE5 - dotted line face (虚线脸/透明脸)
😶‍🌫️ U+1F636 U+200D U+1F32B U+FE0F - face in clouds (云雾中的脸)
😏 U+1F60F - smirking face (得意/假笑的脸)
😒 U+1F612 - unamused face (不悦/无语的脸)
🙄 U+1F644 - face with rolling eyes (翻白眼脸)
😬 U+1F62C - grimacing face (龇牙咧嘴/尴尬的脸)
😮‍💨 U+1F62E U+200D U+1F4A8 - face exhaling (呼气的脸)
🤥 U+1F925 - lying face (说谎/匹诺曹脸)
🫨 U+1FAE8 - shaking face (震动脸)
😴 U+1F634 - sleeping face (睡觉脸)
😪 U+1F62A - sleepy face (困倦脸)
🤤 U+1F924 - drooling face (流口水脸)
🫩 U+1FAE9 - face with bags under eyes (带眼袋的脸)
😷 U+1F637 - face with medical mask (戴口罩的脸)
🤒 U+1F912 - face with thermometer (带温度计的脸)
🤕 U+1F915 - face with head-bandage (头部包扎的脸)
🤢 U+1F922 - nauseated face (恶心脸)
🤮 U+1F92E - face vomiting (呕吐脸)
🤧 U+1F927 - sneezing face (打喷嚏脸)
🥵 U+1F975 - hot face (热脸)
🥶 U+1F976 - cold face (冷脸)
🥴 U+1F974 - woozy face (眩晕脸)
😵 U+1F635 - face with crossed-out eyes (交叉眼/晕厥脸)
😵‍💫 U+1F635 U+200D U+1F4AB - face with spiral eyes (螺旋眼/头晕脸)
🤯 U+1F92F - exploding head (爆炸头/震惊脸) (注:原名无face,略)
🤓 U+1F913 - nerd face (书呆子脸)
🧐 U+1F9D0 - face with monocle (戴单片眼镜的脸)
😟 负面或中性表情 (Negative / Neutral)
😐 U+1F610 - neutral face (中性/面无表情)
😑 U+1F611 - expressionless face (毫无表情的脸)
😕 U+1F615 - confused face (困惑脸)
🫤 U+1FAE4 - face with diagonal mouth (斜嘴脸/无奈脸)
😟 U+1F61F - worried face (担忧脸)
🙁 U+1F641 - slightly frowning face (微微皱眉的脸)
☹️ U+2639 U+FE0F - frowning face (皱眉脸)
😮 U+1F62E - face with open mouth (张嘴脸)
😯 U+1F62F - hushed face (安静/惊讶脸)
😲 U+1F632 - astonished face (震惊脸)
😳 U+1F633 - flushed face (脸红脸)
🫪 U+1FAEA - distorted face (扭曲脸) (Unicode 17.0 新增)
🥺 U+1F97A - pleading face (恳求/可怜脸)
🥹 U+1F979 - face holding back tears (强忍泪水的脸)
😦 U+1F626 - frowning face with open mouth (张嘴皱眉脸)
😧 U+1F627 - anguished face (痛苦脸)
😨 U+1F628 - fearful face (恐惧脸)
😰 U+1F630 - anxious face with sweat (焦虑流汗脸)
😥 U+1F625 - sad but relieved face (悲伤但释然的脸) (已列于上方,此处为交叉属性)
😢 U+1F622 - crying face (哭泣脸)
😭 U+1F62D - loudly crying face (大声哭泣脸)
😱 U+1F631 - face screaming in fear (恐惧尖叫脸)
😖 U+1F616 - confounded face (沮丧/困惑脸)
😣 U+1F623 - persevering face (坚持/忍耐脸)
😞 U+1F61E - disappointed face (失望脸)
😓 U+1F613 - downcast face with sweat (沮丧流汗脸)
😩 U+1F629 - weary face (疲惫脸)
😫 U+1F62B - tired face (劳累脸)
🥱 U+1F971 - yawning face (打哈欠脸)
😤 U+1F624 - face with steam from nose (鼻孔出气/得意脸)
😡 U+1F621 - enraged face (愤怒脸)
😠 U+1F620 - angry face (生气脸)
🤬 U+1F92C - face with symbols on mouth (嘴含符号/骂人脸)
😈 U+1F608 - smiling face with horns (带角的微笑脸/小恶魔)
👿 U+1F47F - angry face with horns (带角的愤怒脸/大恶魔)
🤡 U+1F921 - clown face (小丑脸)
*/
AI 工具使用说明

使用 AI 查找了相关 emoji 的 Unicode,保证本人贡献大于 AI。

原文
存档评论3 条抓取于