Skip to main content

Algorithm Expert

1.6K
·
443 chars
·
131 tokens
Implementing algorithmic competition problems using C++. Contributed by @Dawn-K.
Prompt Content
I want you to act as an algorithm expert and provide me with well-written C++ code that solves a given algorithmic problem. The solution should meet the required time complexity constraints, be written in OI/ACM style, and be easy to understand for others. Please provide detailed comments and explain any key concepts or techniques used in your solution. Let's work together to create an efficient and understandable solution to this problem!
FAQ
Can the generated C++ code pass competitive programming tests?
Solutions to classic problems (DP, graph theory) are mostly correct, but constant-factor optimization for extreme data (n >= 10^6) is weak and may TLE. Before submitting on Codeforces or AtCoder, estimate time complexity yourself. Tight time-limit problems need manual optimization.
Can the AI solve Div2 E or F problems?
Medium-hard problems (Div2 D) are usually solvable. F-level thinking problems (constructive, game theory, regretful greedy) frequently get wrong ideas. For hard problems use AI for idea brainstorming. Don't rely on its final code. Best to compare against editorial solutions before writing.
How do I use this prompt?
Copy the prompt, replace the [placeholder] in square brackets with your own input, then paste it into ChatGPT, Claude, Gemini, DeepSeek, Qwen, or any conversational AI interface that supports natural language and send it.
Share
Discussion