# parv2807/tmmc architecture

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

- Interactive diagram: https://gitdiagram.com/parv2807/tmmc
- Repository: https://github.com/parv2807/tmmc

## Overview

This repository is a collection of competing C++ solutions and judge programs for an interactive satellite-selection problem. The central workflow reads satellite coordinates, indexes them spatially, answers each disk query by reusing an active satellite or selecting a new one, then outputs its index. The sampled `solA4.cpp` and `judge.cpp` show that workflow and a judge launching that solution. Other variants and judges are present in the tree, but their implementations and relationships were not sampled; they are shown without inferred links.

Main entry points: [`solA4.cpp`](https://github.com/parv2807/tmmc/blob/main/solA4.cpp) (Query selection), [`judge.cpp`](https://github.com/parv2807/tmmc/blob/main/judge.cpp) (C++ judge), [`judgeA.py`](https://github.com/parv2807/tmmc/blob/main/judgeA.py) (Benchmark harness), [`solA..cpp`](https://github.com/parv2807/tmmc/blob/main/solA..cpp) (Solution variant)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_runtime["Solution Runtime"]
  node_input["Input data<br/>[solA4.cpp]"]
  node_grid["Spatial grid<br/>[solA4.cpp]"]
  node_selection["Query selection<br/>[solA4.cpp]"]
  node_active["Active state<br/>[solA4.cpp]"]
  node_output["Index response<br/>[solA4.cpp]"]
end

subgraph group_variants["Solution Variants"]
  node_solaa["Solution variant<br/>[solA..cpp]"]
  node_sola2["Solution variant<br/>[solA2.cpp]"]
  node_sola3["Solution variant<br/>[solA3.cpp]"]
  node_sola4["Solution variant<br/>[solA4.cpp]"]
  node_solution["Solution variant<br/>[solution.cpp]"]
  node_t1["Solution variant<br/>[t1.cpp]"]
  node_v1["Solution variant<br/>[v1.cpp]"]
  node_v2["Solution variant<br/>[v2.cpp]"]
  node_v3["Solution variant<br/>[v3.cpp]"]
  node_v4["Solution variant<br/>[v4.cpp]"]
  node_v5["Solution variant"]
end

subgraph group_judges["Judge Programs"]
  node_judgecpp["C++ judge<br/>[judge.cpp]"]
  node_judgepy["Judge harness<br/>[judge.py]"]
  node_judge2["Judge harness<br/>[judge2.py]"]
  node_judgea["Benchmark harness<br/>[judgeA.py]"]
  node_judges["Judge harness<br/>[judgeS.py]"]
  node_judges2["Judge harness<br/>[judgeS2.py]"]
  node_judgecomp["Judge harness"]
  node_judgelin["Judge harness<br/>[judge_linient.py]"]
end

node_actor(("Interactive judge"))

node_actor -->|"sends queries"| node_judgecpp
node_judgecpp -->|"launches"| node_sola4
node_input -->|"indexes points"| node_grid
node_grid -->|"searches candidates"| node_selection
node_selection -->|"activates choice"| node_active
node_selection -->|"prints index"| node_output
node_output -->|"returns index"| node_judgecpp
node_actor -->|"provides data"| node_input
node_judgea -->|"runs executable"| node_solaa

click node_input "https://github.com/parv2807/tmmc/blob/main/solA4.cpp"
click node_grid "https://github.com/parv2807/tmmc/blob/main/solA4.cpp"
click node_selection "https://github.com/parv2807/tmmc/blob/main/solA4.cpp"
click node_active "https://github.com/parv2807/tmmc/blob/main/solA4.cpp"
click node_output "https://github.com/parv2807/tmmc/blob/main/solA4.cpp"
click node_solaa "https://github.com/parv2807/tmmc/blob/main/solA..cpp"
click node_sola2 "https://github.com/parv2807/tmmc/blob/main/solA2.cpp"
click node_sola3 "https://github.com/parv2807/tmmc/blob/main/solA3.cpp"
click node_sola4 "https://github.com/parv2807/tmmc/blob/main/solA4.cpp"
click node_solution "https://github.com/parv2807/tmmc/blob/main/solution.cpp"
click node_t1 "https://github.com/parv2807/tmmc/blob/main/t1.cpp"
click node_v1 "https://github.com/parv2807/tmmc/blob/main/v1.cpp"
click node_v2 "https://github.com/parv2807/tmmc/blob/main/v2.cpp"
click node_v3 "https://github.com/parv2807/tmmc/blob/main/v3.cpp"
click node_v4 "https://github.com/parv2807/tmmc/blob/main/v4.cpp"
click node_judgecpp "https://github.com/parv2807/tmmc/blob/main/judge.cpp"
click node_judgepy "https://github.com/parv2807/tmmc/blob/main/judge.py"
click node_judge2 "https://github.com/parv2807/tmmc/blob/main/judge2.py"
click node_judgea "https://github.com/parv2807/tmmc/blob/main/judgeA.py"
click node_judges "https://github.com/parv2807/tmmc/blob/main/judgeS.py"
click node_judges2 "https://github.com/parv2807/tmmc/blob/main/judgeS2.py"
click node_judgecomp "https://github.com/parv2807/tmmc/blob/main/judge_competitive.py"
click node_judgelin "https://github.com/parv2807/tmmc/blob/main/judge_linient.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_input,node_grid,node_selection,node_active,node_output toneBlue
class node_solaa,node_sola2,node_sola3,node_sola4,node_solution,node_t1,node_v1,node_v2,node_v3,node_v4,node_v5 toneAmber
class node_judgecpp,node_judgepy,node_judge2,node_judgea,node_judges,node_judges2,node_judgecomp,node_judgelin toneMint
class node_actor toneIndigo
```

## Components

### Solution Runtime

- [Input data](https://github.com/parv2807/tmmc/blob/main/solA4.cpp): `solA4.cpp`
- [Spatial grid](https://github.com/parv2807/tmmc/blob/main/solA4.cpp): `solA4.cpp`
- [Query selection](https://github.com/parv2807/tmmc/blob/main/solA4.cpp): `solA4.cpp`
- [Active state](https://github.com/parv2807/tmmc/blob/main/solA4.cpp): `solA4.cpp`
- [Index response](https://github.com/parv2807/tmmc/blob/main/solA4.cpp): `solA4.cpp`

### Solution Variants

- [Solution variant](https://github.com/parv2807/tmmc/blob/main/solA..cpp): `solA..cpp`
- [Solution variant](https://github.com/parv2807/tmmc/blob/main/solA2.cpp): `solA2.cpp`
- [Solution variant](https://github.com/parv2807/tmmc/blob/main/solA3.cpp): `solA3.cpp`
- [Solution variant](https://github.com/parv2807/tmmc/blob/main/solA4.cpp): `solA4.cpp`
- [Solution variant](https://github.com/parv2807/tmmc/blob/main/solution.cpp): `solution.cpp`
- [Solution variant](https://github.com/parv2807/tmmc/blob/main/t1.cpp): `t1.cpp`
- [Solution variant](https://github.com/parv2807/tmmc/blob/main/v1.cpp): `v1.cpp`
- [Solution variant](https://github.com/parv2807/tmmc/blob/main/v2.cpp): `v2.cpp`
- [Solution variant](https://github.com/parv2807/tmmc/blob/main/v3.cpp): `v3.cpp`
- [Solution variant](https://github.com/parv2807/tmmc/blob/main/v4.cpp): `v4.cpp`
- **Solution variant**

### Judge Programs

- [C++ judge](https://github.com/parv2807/tmmc/blob/main/judge.cpp): `judge.cpp`
- [Judge harness](https://github.com/parv2807/tmmc/blob/main/judge.py): `judge.py`
- [Judge harness](https://github.com/parv2807/tmmc/blob/main/judge2.py): `judge2.py`
- [Benchmark harness](https://github.com/parv2807/tmmc/blob/main/judgeA.py): `judgeA.py`
- [Judge harness](https://github.com/parv2807/tmmc/blob/main/judgeS.py): `judgeS.py`
- [Judge harness](https://github.com/parv2807/tmmc/blob/main/judgeS2.py): `judgeS2.py`
- [Judge harness](https://github.com/parv2807/tmmc/blob/main/judge_competitive.py): `judge_competitive.py`
- [Judge harness](https://github.com/parv2807/tmmc/blob/main/judge_linient.py): `judge_linient.py`

### Other components

- **Interactive judge**

## Connections

- Interactive judge → C++ judge: sends queries (evidence: `judge.cpp`)
- C++ judge → Solution variant: launches (evidence: `judge.cpp`)
- Input data → Spatial grid: indexes points (evidence: `solA4.cpp`)
- Spatial grid → Query selection: searches candidates (evidence: `solA4.cpp`)
- Query selection → Active state: activates choice (evidence: `solA4.cpp`)
- Query selection → Index response: prints index (evidence: `solA4.cpp`)
- Index response → C++ judge: returns index (evidence: `judge.cpp`)
- Interactive judge → Input data: provides data (evidence: `solA4.cpp`)
- Benchmark harness → Solution variant: runs executable (evidence: `judgeA.py`)
