Skip to content
Skills Library
Programming · Building & coding

competitive-programming-expert

/competitive-programming-expert

Use this skill when user needs to solve competitive programming problems. Applicable to LeetCode, Codeforces, AtCoder and similar platforms. Triggers include: algorithm problem, coding challenge, time complexity analysis, data structure implementation, TLE (Time Limit Exceeded), MLE (Memory Limit Exceeded).

Licence
MIT
Last repository change
31.05.2026

Assessment and security

100/ 100Class: good
Format25 / 25
Frontmatter with name and description, valid name, description up to 1,024 characters, name matching the folder.
Discoverability25 / 25
Description explains when to use the skill, has a reasonable length and uses third person.
Content35 / 35
At least 150 words and at most 500 lines, headings, step lists, examples or code.
Hygiene15 / 15
No placeholders such as TODO, no Windows paths, with a licence.
Riskno signals detected in the scan
Files in this package
1
Scripts
0
HTML comments
0
URLs in SKILL.md
0
Deprecation

No signals detected. Repository changed on 31.05.2026, without references to retired models or APIs.

Licence

MIT, open: use and modify while retaining author attribution.

What it does and when to use it

Use this skill when user needs to solve competitive programming problems. Applicable to LeetCode, Codeforces, AtCoder and similar platforms. Triggers include: algorithm problem, coding challenge, time complexity analysis, data structure implementation, TLE (Time Limit Exceeded), MLE (Memory Limit Exceeded).

Original author description

Use this skill when user needs to solve competitive programming problems. Applicable to LeetCode, Codeforces, AtCoder and similar platforms. Triggers include: algorithm problem, coding challenge, time complexity analysis, data structure implementation, TLE (Time Limit Exceeded), MLE (Memory Limit Exceeded).

How it works

  1. Description
  2. When to Use
  3. When NOT to Use
  4. Input
  5. Output
  6. Execution Steps
  7. Failure Handling
  8. See Also
Original SKILL.md headings · 98 lines, 529 words
SKILL.md preview
---
name: competitive-programming-expert
description: "Use this skill when user needs to solve competitive programming problems. Applicable to LeetCode, Codeforces, AtCoder and similar platforms. Triggers include: algorithm problem, coding challenge, time complexity analysis, data structure implementation, TLE (Time Limit Exceeded), MLE (Memory Limit Exceeded)."
---

# Competitive Programming Problem Solver

## Description
Solve competitive programming problems with optimal solutions, complexity analysis, and complete code implementation.

## When to Use
- User provides problem link or description from LeetCode/Codeforces/AtCoder/ACM-ICPC platforms
- User requests "solve this algorithm problem" or "optimize this solution"
- User asks for specific algorithm/data structure implementation (e.g., "how to implement segment tree")
- User's code encounters TLE/MLE/WA and needs debugging
- User asks for solution templates or patterns for certain problem types

## When NOT to Use
- User only asks about algorithm concepts or theory without specific problem
- User needs algorithm design for software engineering, not competitive programming
- User is doing system design or architecture problems
- User only needs code completion or syntax help without algorithmic logic

## Input
```typescript
{
  problem: string          // Problem description or link
  platform?: string        // Platform name (leetcode/codeforces/atcoder, etc.)
  language?: string        // Preferred language (default: C++ or Python)
  userCode?: string        // User's existing code (for optimization/debugging)
  constraints?: {          // Problem constraints
    timeLimit?: string     // e.g., "1s", "2s"
    memoryLimit?: string   // e.g., "256MB"
    inputSize?: string     // e.g., "n ≤ 10^5"
  }
}
```

## Output
```typescript
{
  analysis: {
    type: string           // Problem type (DP/Graph/Greedy/Number Theory, etc.)
    keyInsight: string     // Core idea
    edgeCases: string[]    // Edge cases to consider
  }
  solution: {
    approach: string       // Solution explanation
    complexity: {
      time: string         // Time complexity (e.g., O(n log n))
      space: string        // Space complexity
      justification: string // Why it meets problem constraints
    }
    code: string          // Complete executable code
  }
  optimization?: string   // Optional optimization suggestions
}
```

## Execution Steps

### Step 1: Understand Constraints
- Extract input size upper bound (e.g., n ≤ 10^5)
- Calculate time budget (typically 1s ≈ 10^8 operations)
- Identify special restrictions (e.g., read-only once, online algorithm)

### Step 2: Classify and Model
- Categorize problem into known algorithm types (DP/Graph/Greedy/Number Theory/String/Computational Geometry)
- Extract mathematical model or state definition
- List at least 3 typical edge cases

### Step 3: Design Solution
- Explain core idea in 1-2 sentences
- For non-obvious algorithms (e.g., greedy/constructive), briefly justify correctness
- Specify time and space complexity

### Step 4: Implement Code
Output code according to platform conventions:
- **LeetCode**: Provide class/function definition without main function
- **Codeforces/AtCoder**: Provide complete code with standard I/O
- **Other platforms**: Ask user preference

Code requirements:
- Clear variable naming
- Comments on key steps
- Cover identified edge cases

### Step 5: Verify and Optimize
- Validate correctness with sample inputs
- If user provides existing code, compare differences and identify bottlenecks
- If constant-factor optimizations exist (e.g., fast I/O, bitwise tricks), mention separately

## Failure Handling
- **Unclear problem**: Request complete problem statement or link
- **Missing constraints**: Ask for input size bounds and time limits
- **No optimal solution exists**: Provide passable solution first, then discuss if better approach exists
- **Language not supported**: Explain language limitations and suggest alternatives

## See Also
- `cpp-expert` — language-level optimization, STL, and UB concerns for C++ submissions.
- `python-expert` — fast I/O and idiomatic patterns for Python submissions.
- `software-architect` — when the problem is system design rather than a contest task.

Versions

The database has no other skills named competitive-programming-expert.

Database snapshot: 13.11.2026 · package version dcac916242db (SHA-256 digest of the entire package)

Downloads in the last 30 days: 0 · ranking

Report a problem with this skill: harmful content, incorrect descriptions or an author’s removal request.

Similar skills

  • 100solve
    Solve competitive programming and LeetCode-style problems with educational explanations. Use when asked to "solve this problem", "help with this leetcode", "competitive programming solution", "solve this algorithm problem", "coding challenge solution", "how to solve this coding…
  • 100verify
    Verify a competitive programming or LeetCode solution for correctness, edge cases, and performance. Use when asked to "verify my solution", "check my code", "is this solution correct", "test my solution", "review my competitive programming answer", "validate my algorithm", or…
  • 90code-forge
    All-in-one advanced coding skill - Replica (rebuild a website or app UI from a URL or screenshots you are allowed to use), reverse engineering for authorized security work, CTF and learning (your own binaries, APKs, firmware), competitive programming (Codeforces, LeetCode,…
  • 100oi-digest
    把 AtCoder/CF 题目的题解提炼成 dsh-oi-knowledge 插件能吃的 essence + 观察/套路/思路/思考方向/坑点,批量消化已通过题。任务涉及「消化题目 / 补精髓 / 批量录题 / 反套路推荐」时使用。
  • 100leetcode-coach
    Find and set up coding practice problems tailored to your weak areas, then create local files so you can solve them right away. Use this skill when a user wants to practice coding, asks for a LeetCode problem, says "give me a coding challenge", "I want to practice DSA", "help me…
  • 100interactive-leetcode-mcp
    Use when the user wants to practice LeetCode problems, submit solutions, or set up LeetCode integration. Covers MCP server installation, learning-guided practice flow, solution submission, and authentication.

Feedback and reports

Your message goes to Bartosz Sokoliński. An email address is needed only for a reply. See the privacy policy.