# kalpanabhaskar/codeforces_contest architecture

> Architecture diagram of the GitHub repository kalpanabhaskar/codeforces_contest, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-10-04). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/kalpanabhaskar/codeforces_contest
- Repository: https://github.com/kalpanabhaskar/codeforces_contest

## Overview

This repository is a collection of independent competitive-programming solutions, not a single application. For most scripts, the workflow is read cases from standard input, compute an answer, and print it; the 2026 preliminaries file collects solutions for multiple problems in one module. The dated folders represent separate contest sets. The 2026 file’s shown solver calls are commented out, so its runtime entry point is unclear; its node is included without inferred input/output edges.

Main entry points: [`2025_icpc/q1.py`](https://github.com/kalpanabhaskar/codeforces_contest/blob/main/2025_icpc/q1.py) (Palindrome check), [`2025_icpc/q2.py`](https://github.com/kalpanabhaskar/codeforces_contest/blob/main/2025_icpc/q2.py) (Run counting), [`2025_icpc/q2_other.py`](https://github.com/kalpanabhaskar/codeforces_contest/blob/main/2025_icpc/q2_other.py) (Gap validation), [`sep-21-2026/q1.py`](https://github.com/kalpanabhaskar/codeforces_contest/blob/main/sep-21-2026/q1.py) (Minimum difference)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_icpc2025["2025 ICPC"]
  node_y25q1["Palindrome check<br/>[q1.py]"]
  node_y25q2["Run counting<br/>[q2.py]"]
  node_y25q2other["Gap validation<br/>[q2_other.py]"]
  node_y25q3["Question 3<br/>[q3.py]"]
end

subgraph group_prelims2026["2026 Preliminaries"]
  node_prelimsolutions["Problem solutions<br/>[icpc_solutions.py]"]
end

subgraph group_sep2026["September 2026"]
  node_s21q1["Minimum difference<br/>[q1.py]"]
  node_s21q2["Score calculation<br/>[q2.py]"]
  node_s21q3["Binary string edits<br/>[q3.py]"]
  node_s21q4["Consecutive values<br/>[q4.py]"]
  node_s21q5["Prime factor DP<br/>[q5.py]"]
  node_s28q1["Cycle sum<br/>[q1.py]"]
  node_s28q2["Question 2<br/>[q2.py]"]
end

node_stdin(("Standard input"))
node_stdout(("Standard output"))

node_stdin -->|"reads cases"| node_y25q1
node_y25q1 -->|"prints answers"| node_stdout
node_stdin -->|"reads cases"| node_y25q2
node_y25q2 -->|"prints answers"| node_stdout
node_stdin -->|"reads cases"| node_y25q2other
node_y25q2other -->|"prints answers"| node_stdout
node_stdin -->|"reads input"| node_y25q3
node_stdin -->|"reads cases"| node_s21q1
node_s21q1 -->|"prints answers"| node_stdout
node_stdin -->|"reads cases"| node_s21q2
node_s21q2 -->|"prints answers"| node_stdout
node_stdin -->|"reads cases"| node_s21q3
node_s21q3 -->|"prints answers"| node_stdout
node_stdin -->|"reads cases"| node_s21q4
node_s21q4 -->|"prints answers"| node_stdout
node_stdin -->|"reads cases"| node_s21q5
node_s21q5 -->|"prints answers"| node_stdout
node_stdin -->|"reads cases"| node_s28q1
node_s28q1 -->|"prints answers"| node_stdout

click node_y25q1 "https://github.com/kalpanabhaskar/codeforces_contest/blob/main/2025_icpc/q1.py"
click node_y25q2 "https://github.com/kalpanabhaskar/codeforces_contest/blob/main/2025_icpc/q2.py"
click node_y25q2other "https://github.com/kalpanabhaskar/codeforces_contest/blob/main/2025_icpc/q2_other.py"
click node_y25q3 "https://github.com/kalpanabhaskar/codeforces_contest/blob/main/2025_icpc/q3.py"
click node_prelimsolutions "https://github.com/kalpanabhaskar/codeforces_contest/blob/main/2026-icpc-prelims/icpc_solutions.py"
click node_s21q1 "https://github.com/kalpanabhaskar/codeforces_contest/blob/main/sep-21-2026/q1.py"
click node_s21q2 "https://github.com/kalpanabhaskar/codeforces_contest/blob/main/sep-21-2026/q2.py"
click node_s21q3 "https://github.com/kalpanabhaskar/codeforces_contest/blob/main/sep-21-2026/q3.py"
click node_s21q4 "https://github.com/kalpanabhaskar/codeforces_contest/blob/main/sep-21-2026/q4.py"
click node_s21q5 "https://github.com/kalpanabhaskar/codeforces_contest/blob/main/sep-21-2026/q5.py"
click node_s28q1 "https://github.com/kalpanabhaskar/codeforces_contest/blob/main/sep-28-26/q1.py"
click node_s28q2 "https://github.com/kalpanabhaskar/codeforces_contest/blob/main/sep-28-26/q2.py"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_y25q1,node_y25q2,node_y25q2other,node_y25q3 toneBlue
class node_prelimsolutions toneAmber
class node_s21q1,node_s21q2,node_s21q3,node_s21q4,node_s21q5,node_s28q1,node_s28q2 toneMint
class node_stdin,node_stdout toneIndigo
```

## Components

### 2025 ICPC

- [Palindrome check](https://github.com/kalpanabhaskar/codeforces_contest/blob/main/2025_icpc/q1.py): `2025_icpc/q1.py`
- [Run counting](https://github.com/kalpanabhaskar/codeforces_contest/blob/main/2025_icpc/q2.py): `2025_icpc/q2.py`
- [Gap validation](https://github.com/kalpanabhaskar/codeforces_contest/blob/main/2025_icpc/q2_other.py): `2025_icpc/q2_other.py`
- [Question 3](https://github.com/kalpanabhaskar/codeforces_contest/blob/main/2025_icpc/q3.py): `2025_icpc/q3.py`

### 2026 Preliminaries

- [Problem solutions](https://github.com/kalpanabhaskar/codeforces_contest/blob/main/2026-icpc-prelims/icpc_solutions.py): `2026-icpc-prelims/icpc_solutions.py`

### September 2026

- [Minimum difference](https://github.com/kalpanabhaskar/codeforces_contest/blob/main/sep-21-2026/q1.py): `sep-21-2026/q1.py`
- [Score calculation](https://github.com/kalpanabhaskar/codeforces_contest/blob/main/sep-21-2026/q2.py): `sep-21-2026/q2.py`
- [Binary string edits](https://github.com/kalpanabhaskar/codeforces_contest/blob/main/sep-21-2026/q3.py): `sep-21-2026/q3.py`
- [Consecutive values](https://github.com/kalpanabhaskar/codeforces_contest/blob/main/sep-21-2026/q4.py): `sep-21-2026/q4.py`
- [Prime factor DP](https://github.com/kalpanabhaskar/codeforces_contest/blob/main/sep-21-2026/q5.py): `sep-21-2026/q5.py`
- [Cycle sum](https://github.com/kalpanabhaskar/codeforces_contest/blob/main/sep-28-26/q1.py): `sep-28-26/q1.py`
- [Question 2](https://github.com/kalpanabhaskar/codeforces_contest/blob/main/sep-28-26/q2.py): `sep-28-26/q2.py`

### Other components

- **Standard input**
- **Standard output**

## Connections

- Standard input → Palindrome check: reads cases (evidence: `2025_icpc/q1.py`)
- Palindrome check → Standard output: prints answers (evidence: `2025_icpc/q1.py`)
- Standard input → Run counting: reads cases (evidence: `2025_icpc/q2.py`)
- Run counting → Standard output: prints answers (evidence: `2025_icpc/q2.py`)
- Standard input → Gap validation: reads cases (evidence: `2025_icpc/q2_other.py`)
- Gap validation → Standard output: prints answers (evidence: `2025_icpc/q2_other.py`)
- Standard input → Question 3: reads input (evidence: `2025_icpc/q3.py`)
- Standard input → Minimum difference: reads cases (evidence: `sep-21-2026/q1.py`)
- Minimum difference → Standard output: prints answers (evidence: `sep-21-2026/q1.py`)
- Standard input → Score calculation: reads cases (evidence: `sep-21-2026/q2.py`)
- Score calculation → Standard output: prints answers (evidence: `sep-21-2026/q2.py`)
- Standard input → Binary string edits: reads cases (evidence: `sep-21-2026/q3.py`)
- Binary string edits → Standard output: prints answers (evidence: `sep-21-2026/q3.py`)
- Standard input → Consecutive values: reads cases (evidence: `sep-21-2026/q4.py`)
- Consecutive values → Standard output: prints answers (evidence: `sep-21-2026/q4.py`)
- Standard input → Prime factor DP: reads cases (evidence: `sep-21-2026/q5.py`)
- Prime factor DP → Standard output: prints answers (evidence: `sep-21-2026/q5.py`)
- Standard input → Cycle sum: reads cases (evidence: `sep-28-26/q1.py`)
- Cycle sum → Standard output: prints answers (evidence: `sep-28-26/q1.py`)
