# tentaka335/cp-workspace architecture

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

- Interactive diagram: https://gitdiagram.com/tentaka335/cp-workspace
- Repository: https://github.com/tentaka335/cp-workspace

## Overview

This repository is a personal competitive-programming archive, not one integrated application. Its principal workflow is to run an individual problem solution, read a case from standard input, compute an answer, and print it; the sampled standalone programs show this pattern. The tree also contains algorithm templates and a reusable matrix implementation. The README is empty, and most solutions are unsampled, so the graph groups the corpus by its visible directories and avoids implying calls between independent files.

Main entry points: [`ADT/D_Card_Pile_Query.cpp`](https://github.com/tentaka335/cp-workspace/blob/main/ADT/D_Card_Pile_Query.cpp) (Card pile query), [`ADT/G_Reachability_Query_2.cpp`](https://github.com/tentaka335/cp-workspace/blob/main/ADT/G_Reachability_Query_2.cpp) (Reachability queries), [`tessoku/A66ConnectQuery.cpp`](https://github.com/tentaka335/cp-workspace/blob/main/tessoku/A66ConnectQuery.cpp) (Connectivity queries), [`tessoku/A62-DepthFirstSearch.cpp`](https://github.com/tentaka335/cp-workspace/blob/main/tessoku/A62-DepthFirstSearch.cpp) (Graph connectivity)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_contest["Contest solutions"]
  node_powernim["2-power Nim<br/>[2powernim.cpp]"]
  node_adt["ADT solutions"]
  node_atcoder["AtCoder solutions"]
  node_cardpile["Card pile query"]
  node_rangecount["Range count query"]
  node_reachability["Reachability queries"]
  node_maxmin["Max-min queries<br/>[Max_Min_Query.cpp]"]
  node_abc249["Just K<br/>[Just_K.cpp]"]
  node_circumferences["Circumferences<br/>[Circumferences.cpp]"]
  node_operations["Many operations"]
  node_triangle["Triangle easier"]
  node_lrud["LRUD instructions"]
  node_medicine["Medicine<br/>[Medicine.cpp]"]
  node_prefixsuffix["Prefix and suffix"]
  node_tilepattern["Tile pattern<br/>[Tile_Pattern.cpp]"]
  node_pyramid["Pyramid<br/>[Pyramid.cpp]"]
  node_santa["Santa Claus 2<br/>[Santa_Claus_2.cpp]"]
  node_abc387d["ABC387 D<br/>[D.cpp]"]
  node_wallbreaker["Wall breaker"]
end

subgraph group_practice["Practice sets"]
  node_review["Reviewed solutions"]
  node_tessoku["Tessoku solutions"]
  node_tenkei["Tenkei solutions"]
  node_edu["DP exercises"]
  node_librarychecker["Library Checker"]
  node_connectquery["Connectivity queries"]
  node_dfs["Graph connectivity"]
  node_cards["Card box queries"]
  node_fillrect["Grid fill queries"]
  node_rangexor["Range XOR queries"]
  node_powmatrix["Matrix power solution<br/>[Pow_of_Matrix.cpp]"]
end

subgraph group_library["Algorithms and templates"]
  node_fenwick["Fenwick tree example<br/>[Fenwick_Tree.cpp]"]
  node_binarysearch["Binary search template"]
  node_matrix["Matrix operations<br/>[Pow_of_Matrix.cpp]"]
end

node_runner(("Problem runner"))

node_runner -->|"provides input"| node_cardpile
node_cardpile -->|"prints answer"| node_runner
node_runner -->|"provides input"| node_reachability
node_reachability -->|"prints answer"| node_runner
node_runner -->|"provides input"| node_connectquery
node_connectquery -->|"prints answer"| node_runner
node_runner -->|"provides input"| node_dfs
node_dfs -->|"prints answer"| node_runner
node_runner -->|"provides input"| node_cards
node_cards -->|"prints answer"| node_runner
node_runner -->|"provides input"| node_fillrect
node_fillrect -->|"prints grid"| node_runner
node_runner -->|"provides input"| node_rangexor
node_rangexor -->|"prints answer"| node_runner
node_runner -->|"provides input"| node_powmatrix
node_powmatrix -->|"prints matrix"| node_runner

click node_powernim "https://github.com/tentaka335/cp-workspace/blob/main/2powernim.cpp"
click node_adt "https://github.com/tentaka335/cp-workspace/tree/main/ADT"
click node_atcoder "https://github.com/tentaka335/cp-workspace/tree/main/Atcoder"
click node_review "https://github.com/tentaka335/cp-workspace/tree/main/%E6%9C%AA%E6%8C%AF%E3%82%8A%E8%BF%94%E3%82%8A"
click node_tessoku "https://github.com/tentaka335/cp-workspace/tree/main/tessoku"
click node_tenkei "https://github.com/tentaka335/cp-workspace/tree/main/tenkei90"
click node_edu "https://github.com/tentaka335/cp-workspace/tree/main/EducationalDPContest"
click node_librarychecker "https://github.com/tentaka335/cp-workspace/tree/main/Library-Checker"
click node_fenwick "https://github.com/tentaka335/cp-workspace/blob/main/ACLpracticecontest/Fenwick_Tree.cpp"
click node_binarysearch "https://github.com/tentaka335/cp-workspace/blob/main/my-library/%E3%82%81%E3%81%90%E3%82%8B%E5%BC%8FBinarySearch.cpp"
click node_matrix "https://github.com/tentaka335/cp-workspace/blob/main/Library-Checker/Pow_of_Matrix.cpp"
click node_cardpile "https://github.com/tentaka335/cp-workspace/blob/main/ADT/D_Card_Pile_Query.cpp"
click node_rangecount "https://github.com/tentaka335/cp-workspace/blob/main/ADT/G_Range_Count_Query.cpp"
click node_reachability "https://github.com/tentaka335/cp-workspace/blob/main/ADT/G_Reachability_Query_2.cpp"
click node_maxmin "https://github.com/tentaka335/cp-workspace/blob/main/ADT/Max_Min_Query.cpp"
click node_connectquery "https://github.com/tentaka335/cp-workspace/blob/main/tessoku/A66ConnectQuery.cpp"
click node_dfs "https://github.com/tentaka335/cp-workspace/blob/main/tessoku/A62-DepthFirstSearch.cpp"
click node_cards "https://github.com/tentaka335/cp-workspace/blob/main/%E6%9C%AA%E6%8C%AF%E3%82%8A%E8%BF%94%E3%82%8A/Cards_Query_Problem.cpp"
click node_fillrect "https://github.com/tentaka335/cp-workspace/blob/main/%E6%9C%AA%E6%8C%AF%E3%82%8A%E8%BF%94%E3%82%8A/Fill_Rect_Query.cpp"
click node_rangexor "https://github.com/tentaka335/cp-workspace/blob/main/%E6%9C%AA%E6%8C%AF%E3%82%8A%E8%BF%94%E3%82%8A/Range_Xor_Query.cpp"
click node_powmatrix "https://github.com/tentaka335/cp-workspace/blob/main/Library-Checker/Pow_of_Matrix.cpp"
click node_abc249 "https://github.com/tentaka335/cp-workspace/blob/main/Atcoder/ABC249/Just_K.cpp"
click node_circumferences "https://github.com/tentaka335/cp-workspace/blob/main/Atcoder/ABC259/Circumferences.cpp"
click node_operations "https://github.com/tentaka335/cp-workspace/blob/main/Atcoder/ABC261/Many_Operations.cpp"
click node_triangle "https://github.com/tentaka335/cp-workspace/blob/main/Atcoder/ABC262/Triangle_Easier.cpp"
click node_lrud "https://github.com/tentaka335/cp-workspace/blob/main/Atcoder/ABC273/LRUD_Instructions.cpp"
click node_medicine "https://github.com/tentaka335/cp-workspace/blob/main/Atcoder/ABC309/Medicine.cpp"
click node_prefixsuffix "https://github.com/tentaka335/cp-workspace/blob/main/Atcoder/ABC322/Prefix_and_Suffix.cpp"
click node_tilepattern "https://github.com/tentaka335/cp-workspace/blob/main/Atcoder/ABC331/Tile_Pattern.cpp"
click node_pyramid "https://github.com/tentaka335/cp-workspace/blob/main/Atcoder/ABC336/Pyramid.cpp"
click node_santa "https://github.com/tentaka335/cp-workspace/blob/main/Atcoder/ABC385/Santa_Claus_2.cpp"
click node_abc387d "https://github.com/tentaka335/cp-workspace/blob/main/Atcoder/ABC387/D.cpp"
click node_wallbreaker "https://github.com/tentaka335/cp-workspace/blob/main/Atcoder/ABC400/Takahashi_the_Wall_Breaker.cpp"

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_powernim,node_adt,node_atcoder,node_cardpile,node_rangecount,node_reachability,node_maxmin,node_abc249,node_circumferences,node_operations,node_triangle,node_lrud,node_medicine,node_prefixsuffix,node_tilepattern,node_pyramid,node_santa,node_abc387d,node_wallbreaker toneBlue
class node_review,node_tessoku,node_tenkei,node_edu,node_librarychecker,node_connectquery,node_dfs,node_cards,node_fillrect,node_rangexor,node_powmatrix toneAmber
class node_fenwick,node_binarysearch,node_matrix toneMint
class node_runner toneIndigo
```

## Components

### Contest solutions

- [2-power Nim](https://github.com/tentaka335/cp-workspace/blob/main/2powernim.cpp): `2powernim.cpp`
- [ADT solutions](https://github.com/tentaka335/cp-workspace/tree/main/ADT): `ADT`
- [AtCoder solutions](https://github.com/tentaka335/cp-workspace/tree/main/Atcoder): `Atcoder`
- [Card pile query](https://github.com/tentaka335/cp-workspace/blob/main/ADT/D_Card_Pile_Query.cpp): `ADT/D_Card_Pile_Query.cpp`
- [Range count query](https://github.com/tentaka335/cp-workspace/blob/main/ADT/G_Range_Count_Query.cpp): `ADT/G_Range_Count_Query.cpp`
- [Reachability queries](https://github.com/tentaka335/cp-workspace/blob/main/ADT/G_Reachability_Query_2.cpp): `ADT/G_Reachability_Query_2.cpp`
- [Max-min queries](https://github.com/tentaka335/cp-workspace/blob/main/ADT/Max_Min_Query.cpp): `ADT/Max_Min_Query.cpp`
- [Just K](https://github.com/tentaka335/cp-workspace/blob/main/Atcoder/ABC249/Just_K.cpp): `Atcoder/ABC249/Just_K.cpp`
- [Circumferences](https://github.com/tentaka335/cp-workspace/blob/main/Atcoder/ABC259/Circumferences.cpp): `Atcoder/ABC259/Circumferences.cpp`
- [Many operations](https://github.com/tentaka335/cp-workspace/blob/main/Atcoder/ABC261/Many_Operations.cpp): `Atcoder/ABC261/Many_Operations.cpp`
- [Triangle easier](https://github.com/tentaka335/cp-workspace/blob/main/Atcoder/ABC262/Triangle_Easier.cpp): `Atcoder/ABC262/Triangle_Easier.cpp`
- [LRUD instructions](https://github.com/tentaka335/cp-workspace/blob/main/Atcoder/ABC273/LRUD_Instructions.cpp): `Atcoder/ABC273/LRUD_Instructions.cpp`
- [Medicine](https://github.com/tentaka335/cp-workspace/blob/main/Atcoder/ABC309/Medicine.cpp): `Atcoder/ABC309/Medicine.cpp`
- [Prefix and suffix](https://github.com/tentaka335/cp-workspace/blob/main/Atcoder/ABC322/Prefix_and_Suffix.cpp): `Atcoder/ABC322/Prefix_and_Suffix.cpp`
- [Tile pattern](https://github.com/tentaka335/cp-workspace/blob/main/Atcoder/ABC331/Tile_Pattern.cpp): `Atcoder/ABC331/Tile_Pattern.cpp`
- [Pyramid](https://github.com/tentaka335/cp-workspace/blob/main/Atcoder/ABC336/Pyramid.cpp): `Atcoder/ABC336/Pyramid.cpp`
- [Santa Claus 2](https://github.com/tentaka335/cp-workspace/blob/main/Atcoder/ABC385/Santa_Claus_2.cpp): `Atcoder/ABC385/Santa_Claus_2.cpp`
- [ABC387 D](https://github.com/tentaka335/cp-workspace/blob/main/Atcoder/ABC387/D.cpp): `Atcoder/ABC387/D.cpp`
- [Wall breaker](https://github.com/tentaka335/cp-workspace/blob/main/Atcoder/ABC400/Takahashi_the_Wall_Breaker.cpp): `Atcoder/ABC400/Takahashi_the_Wall_Breaker.cpp`

### Practice sets

- [Reviewed solutions](https://github.com/tentaka335/cp-workspace/tree/main/%E6%9C%AA%E6%8C%AF%E3%82%8A%E8%BF%94%E3%82%8A): `未振り返り`
- [Tessoku solutions](https://github.com/tentaka335/cp-workspace/tree/main/tessoku): `tessoku`
- [Tenkei solutions](https://github.com/tentaka335/cp-workspace/tree/main/tenkei90): `tenkei90`
- [DP exercises](https://github.com/tentaka335/cp-workspace/tree/main/EducationalDPContest): `EducationalDPContest`
- [Library Checker](https://github.com/tentaka335/cp-workspace/tree/main/Library-Checker): `Library-Checker`
- [Connectivity queries](https://github.com/tentaka335/cp-workspace/blob/main/tessoku/A66ConnectQuery.cpp): `tessoku/A66ConnectQuery.cpp`
- [Graph connectivity](https://github.com/tentaka335/cp-workspace/blob/main/tessoku/A62-DepthFirstSearch.cpp): `tessoku/A62-DepthFirstSearch.cpp`
- [Card box queries](https://github.com/tentaka335/cp-workspace/blob/main/%E6%9C%AA%E6%8C%AF%E3%82%8A%E8%BF%94%E3%82%8A/Cards_Query_Problem.cpp): `未振り返り/Cards_Query_Problem.cpp`
- [Grid fill queries](https://github.com/tentaka335/cp-workspace/blob/main/%E6%9C%AA%E6%8C%AF%E3%82%8A%E8%BF%94%E3%82%8A/Fill_Rect_Query.cpp): `未振り返り/Fill_Rect_Query.cpp`
- [Range XOR queries](https://github.com/tentaka335/cp-workspace/blob/main/%E6%9C%AA%E6%8C%AF%E3%82%8A%E8%BF%94%E3%82%8A/Range_Xor_Query.cpp): `未振り返り/Range_Xor_Query.cpp`
- [Matrix power solution](https://github.com/tentaka335/cp-workspace/blob/main/Library-Checker/Pow_of_Matrix.cpp): `Library-Checker/Pow_of_Matrix.cpp`

### Algorithms and templates

- [Fenwick tree example](https://github.com/tentaka335/cp-workspace/blob/main/ACLpracticecontest/Fenwick_Tree.cpp): `ACLpracticecontest/Fenwick_Tree.cpp`
- [Binary search template](https://github.com/tentaka335/cp-workspace/blob/main/my-library/%E3%82%81%E3%81%90%E3%82%8B%E5%BC%8FBinarySearch.cpp): `my-library/めぐる式BinarySearch.cpp`
- [Matrix operations](https://github.com/tentaka335/cp-workspace/blob/main/Library-Checker/Pow_of_Matrix.cpp): `Library-Checker/Pow_of_Matrix.cpp`

### Other components

- **Problem runner**

## Connections

- Problem runner → Card pile query: provides input (evidence: `ADT/D_Card_Pile_Query.cpp`)
- Card pile query → Problem runner: prints answer (evidence: `ADT/D_Card_Pile_Query.cpp`)
- Problem runner → Reachability queries: provides input (evidence: `ADT/G_Reachability_Query_2.cpp`)
- Reachability queries → Problem runner: prints answer (evidence: `ADT/G_Reachability_Query_2.cpp`)
- Problem runner → Connectivity queries: provides input (evidence: `tessoku/A66ConnectQuery.cpp`)
- Connectivity queries → Problem runner: prints answer (evidence: `tessoku/A66ConnectQuery.cpp`)
- Problem runner → Graph connectivity: provides input (evidence: `tessoku/A62-DepthFirstSearch.cpp`)
- Graph connectivity → Problem runner: prints answer (evidence: `tessoku/A62-DepthFirstSearch.cpp`)
- Problem runner → Card box queries: provides input (evidence: `未振り返り/Cards_Query_Problem.cpp`)
- Card box queries → Problem runner: prints answer (evidence: `未振り返り/Cards_Query_Problem.cpp`)
- Problem runner → Grid fill queries: provides input (evidence: `未振り返り/Fill_Rect_Query.cpp`)
- Grid fill queries → Problem runner: prints grid (evidence: `未振り返り/Fill_Rect_Query.cpp`)
- Problem runner → Range XOR queries: provides input (evidence: `未振り返り/Range_Xor_Query.cpp`)
- Range XOR queries → Problem runner: prints answer (evidence: `未振り返り/Range_Xor_Query.cpp`)
- Problem runner → Matrix power solution: provides input (evidence: `Library-Checker/Pow_of_Matrix.cpp`)
- Matrix power solution → Problem runner: prints matrix (evidence: `Library-Checker/Pow_of_Matrix.cpp`)
