该提示词让你扮演算法竞赛专家,针对指定算法问题输出一份满足时间复杂度约束、采用 OI/ACM 风格编写的 C++ 代码。代码需附带详细注释,解释关键概念与技术,确保他人易于理解。使用时只需提供题目描述和约束条件,适合参加算法竞赛、备战面试或刷题的学习者快速获得高质量参考解法。
中文版提示词
请扮演一名算法竞赛专家,为我提供一份解决指定算法问题的 C++ 代码。解法需满足题目要求的时间复杂度约束,采用 OI/ACM 竞赛风格编写,并做到清晰易读、便于他人理解。请提供详细注释,解释其中用到的关键概念和技术。让我们一起创建一个高效且易于理解的解决方案。 题目如下:[题目描述]
英文版提示词
Act as an algorithm competition expert and provide me with C++ code that solves a given algorithm problem. The solution should satisfy the required time-complexity constraints, be written in an OI/ACM competitive programming style, and be clear and easy for others to understand. Please include detailed comments explaining any key concepts or techniques used. Let's work together to create an efficient and understandable solution. Here is the problem: [problem description]

◯ 评论 0