# atcoder-extension **Repository Path**: tututu_qwq/atcoder-extension ## Basic Information - **Project Name**: atcoder-extension - **Description**: VSCode extension for AtCoder - **Primary Language**: Unknown - **License**: Not specified - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2026-05-03 - **Last Updated**: 2026-07-14 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # AtCoder / Codeforces Problem Helper AtCoder / Codeforces Problem Helper is a VS Code extension for fetching competitive programming problems, reading statements, translating problems with LLMs, generating AI explanations, running sample tests locally, and submitting AtCoder code from the editor. ## Disclaimer This extension is an unofficial tool. Users are responsible for complying with the rules, terms of service, contest policies, and API usage policies of AtCoder, Codeforces, and any configured LLM provider. If a user violates platform rules while using this extension, the user bears all resulting consequences. ## Features - Fetch AtCoder and Codeforces contests, plus Luogu training lists and individual Luogu problems by URL. - Read statements, constraints, input/output formats, and samples in the sidebar. - Translate problem statements with LLMs and switch between original and translated content. - Stream translation output directly in the Problems panel. - Generate AI explanations with streaming output, chat bubbles, folded thinking blocks, and copy buttons for code blocks. - Continue asking follow-up questions, regenerate answers, roll back the latest follow-up answer, and undo rollback. - Use Thinking switches for translation and AI Tutor. Translation keeps thinking disabled by default for faster Ollama/Qwen-style reasoning models. - Render problem statements and AI answers with KaTeX, including common bare LaTeX, block formulas, mixed delimiters, and Unicode math symbols. - Save translations and AI explanations into problem history so they can be restored later. - Configure multiple LLM providers, provider switches, model lists, Base URLs, API keys, and provider logos. - Run sample tests locally and compare outputs. - Submit solutions to AtCoder after login. Codeforces, Hydro OJ, and Luogu online submission are intentionally not supported. ## Supported LLM Providers Built-in presets include: - OpenAI - Anthropic - Google Gemini - DeepSeek - SiliconFlow - Zhipu AI - Kimi / Moonshot - Alibaba Cloud Bailian / Qwen - Ollama, using `http://localhost:11434` by default and no API key - OpenCode Go - Custom OpenAI-compatible API Only enabled providers that are configured and have at least one model appear in model dropdowns. Local providers such as Ollama do not require an API key. ## Quick Start 1. Install the extension and open the AtCoder icon in the VS Code Activity Bar. 2. Open the Settings panel and configure at least one LLM provider and model. 3. In the Problems panel, enter an AtCoder contest ID such as `abc350`, a Codeforces contest ID such as `1999`, or paste a full contest/training-list/problem URL such as `https://www.luogu.com.cn/training/1043863` or `https://www.luogu.com.cn/problem/P1001`. 4. Select a problem, then translate it, generate an AI explanation, run samples, or submit your AtCoder solution. ## Common Configuration ```json { "atcoder.llm.provider": "deepseek", "atcoder.llm.deepseek.apiKey": "your-api-key", "atcoder.llm.deepseek.model": "deepseek-chat", "atcoder.llm.targetLanguage": "zh-CN", "atcoder.language": "cpp", "atcoder.cppCompiler": "g++", "atcoder.cppFlags": "-std=c++17 -O2 -Wall" } ``` You can also configure providers, API keys, Base URLs, and model lists in the extension Settings panel. ### Ollama Start Ollama locally and pull a model first: ```bash ollama serve ollama pull qwen2.5-coder:7b ``` Then select Ollama in the Settings panel, keep the Base URL as `http://localhost:11434`, and fetch the local model list. ## Usage ### Fetch Problems Enter a contest ID such as `abc123`, `arc180`, or `1999`, or paste a full AtCoder/Codeforces contest URL, a Luogu training-list URL, or a Luogu problem URL, then click Fetch. Luogu training lists and problems support statement viewing, translation, AI Tutor, local sample tests, and file creation. A training list creates a title-based directory, and its source files use ` .cpp`, for example `P15072 [ICPC 2024 Chengdu R] Arrow a Row.cpp`. Some Luogu resources require login. When that happens, enter `__client_id` and `_uid` in two prompts. The extension saves them to workspace file `.atcoder/luogu.json` (Git-ignored) and reuses them later. They are not stored in VS Code Secret Storage or settings, and are not logged. ### Translate a Problem Open a problem and click Translate. Translation streams into the statement area and is saved to problem history. You can switch between original and translated content at any time. ### AI Tutor Click Generate to create a guided explanation. The AI Tutor supports streaming output, folded thinking blocks, code block copy buttons, follow-up questions, message copy, regeneration, rollback, and undo. ### Run Samples Open the solution file for the current problem and click Run Samples. The extension compiles and runs the configured language against all samples and shows the result for each case. ### Submit Code Log in to AtCoder, open your solution file, and click Submit. If AtCoder requires Cloudflare or Turnstile verification, the extension will prompt you to finish submission in the browser. Codeforces, Hydro OJ, and Luogu problems support local testing, translation, and AI Tutor, but not online submission. ## Commands | Command | Description | | --- | --- | | `AtCoder/Codeforces: Fetch Contest Problems` | Fetch problems for a contest | | `AtCoder: Login` | Log in to AtCoder | | `AtCoder: Submit Solution` | Submit the current solution file | | `AtCoder: Run Sample Tests` | Run sample tests locally | | `AtCoder: Translate Problem` | Translate the current problem | | `AtCoder: Toggle Original/Translated` | Switch between original and translated statement | | `AtCoder: Configure API` | Open API configuration | ## Development ```bash npm install npm run compile npm run watch ``` Main directories: ```text src/ extension.ts providers/ services/ media/ out/ ``` ## Packaging ```bash npm install npm run compile npx vsce package ``` Install the generated `.vsix` with `Extensions: Install from VSIX...` in VS Code. ## License MIT