Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 19 additions & 3 deletions SELF_CONTAINED_HEADER_MIGRATION.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ import と別名を意図的に提供する集約ヘッダーのため、自己
| ----------------------------------------- | -------- | ---- |
| リポジトリ内の `.hpp` | 調査済み | 320 |
| 自己完結化して継続検査しているヘッダー | 移行済み | 319 |
| `template/template.hpp` に依存する verify | 移行待ち | 243 |
| `template/template.hpp` に依存する verify | 移行待ち | 150 |

移行済みヘッダーの正本は
[`scripts/self-contained-headers.txt`](scripts/self-contained-headers.txt)、
Expand Down Expand Up @@ -55,11 +55,12 @@ import と別名を意図的に提供する集約ヘッダーのため、自己

### 3. 対応する verify を移行する

状態: 未着手
状態: 進行中

依存先ヘッダーが自己完結した後、対応する verify から
`template/template.hpp` を削除する。必要な標準ヘッダー、型別名、入出力処理、
補助関数は verify 側に明示する。移行後は
補助関数は verify 側に明示する。verify では簡潔さのため
`using namespace std;` の使用を許可する。移行後は
`scripts/verify-template-include-allowlist.txt` から対象を削除する。

### 4. 移行済みコードの逆戻りを防ぐ
Expand Down Expand Up @@ -143,6 +144,21 @@ g++ -std=c++17 -fsyntax-only -x c++ -include ./path/to/header.hpp /dev/null
| 2026-08-10 | `geometry/template.hpp`、`graph/flow/` の10ヘッダー、`graph/mst/` の1ヘッダー、`graph/others/` の2ヘッダー | 標準 include と `std::` 修飾 |
| 2026-08-10 | `structure/bbst/` の10ヘッダー、`structure/dynamic-tree/` の13ヘッダー、`structure/wavelet/` の2ヘッダー | 標準 include と `std::` 修飾 |
| 2026-08-10 | 移行済みヘッダー34件 | 未修飾標準名と include guard を修正 |
| 2026-08-10 | AOJ DPL の verify 7件 | テンプレート依存を削除 |
| 2026-08-10 | AOJ DPL の組合せ verify 3件 | テンプレート依存を削除 |
| 2026-08-10 | AOJ DSL の verify 6件 | テンプレート依存を削除 |
| 2026-08-10 | AOJ GRL の最短路 verify 6件 | テンプレート依存を削除 |
| 2026-08-10 | AOJ GRL の全域木 verify 5件 | テンプレート依存を削除 |
| 2026-08-10 | AOJ GRL の連結性 verify 3件 | テンプレート依存を削除 |
| 2026-08-10 | AOJ GRL の木 verify 6件 | テンプレート依存を削除 |
| 2026-08-10 | AOJ GRL のフロー verify 6件 | テンプレート依存を削除 |
| 2026-08-10 | AOJ の基礎数論 verify 5件 | テンプレート依存を削除 |
| 2026-08-10 | AOJ ALDS の verify 6件 | テンプレート依存を削除 |
| 2026-08-10 | AOJ CGL の verify 16件 | 出力精度を維持して依存を削除 |
| 2026-08-10 | Library Checker Static RMQ の verify 6件 | テンプレート依存を削除 |
| 2026-08-10 | Library Checker LCA の verify 4件 | テンプレート依存を削除 |
| 2026-08-10 | Library Checker Range Kth Smallest の verify 3件 | テンプレート依存を削除 |
| 2026-08-10 | Library Checker の基礎 verify 11件 | テンプレート依存を削除 |

## 次の候補

Expand Down
93 changes: 0 additions & 93 deletions scripts/verify-template-include-allowlist.txt
Original file line number Diff line number Diff line change
Expand Up @@ -33,75 +33,6 @@ test/verify/aoj-2821.test.cpp
test/verify/aoj-3022.test.cpp
test/verify/aoj-3139.test.cpp
test/verify/aoj-3198.test.cpp
test/verify/aoj-alds-1-1-c-2.test.cpp
test/verify/aoj-alds-1-1-c.test.cpp
test/verify/aoj-alds-1-11-c.test.cpp
test/verify/aoj-alds-1-14-b.test.cpp
test/verify/aoj-alds-1-14-d.test.cpp
test/verify/aoj-alds-1-9-c.test.cpp
test/verify/aoj-cgl-1-a.test.cpp
test/verify/aoj-cgl-1-b.test.cpp
test/verify/aoj-cgl-1-c.test.cpp
test/verify/aoj-cgl-2-a.test.cpp
test/verify/aoj-cgl-2-b.test.cpp
test/verify/aoj-cgl-2-c.test.cpp
test/verify/aoj-cgl-2-d.test.cpp
test/verify/aoj-cgl-3-a.test.cpp
test/verify/aoj-cgl-3-b.test.cpp
test/verify/aoj-cgl-3-c.test.cpp
test/verify/aoj-cgl-4-a.test.cpp
test/verify/aoj-cgl-4-b.test.cpp
test/verify/aoj-cgl-4-c.test.cpp
test/verify/aoj-cgl-7-d.test.cpp
test/verify/aoj-cgl-7-e.test.cpp
test/verify/aoj-cgl-7-h.test.cpp
test/verify/aoj-dpl-1-b.test.cpp
test/verify/aoj-dpl-1-c.test.cpp
test/verify/aoj-dpl-1-d.test.cpp
test/verify/aoj-dpl-1-e.test.cpp
test/verify/aoj-dpl-1-f.test.cpp
test/verify/aoj-dpl-1-i.test.cpp
test/verify/aoj-dpl-3-c.test.cpp
test/verify/aoj-dpl-5-g.test.cpp
test/verify/aoj-dpl-5-i.test.cpp
test/verify/aoj-dpl-5-j.test.cpp
test/verify/aoj-dsl-1-a.test.cpp
test/verify/aoj-dsl-1-b.test.cpp
test/verify/aoj-dsl-2-a.test.cpp
test/verify/aoj-dsl-2-b-2.test.cpp
test/verify/aoj-dsl-2-b.test.cpp
test/verify/aoj-dsl-2-d.test.cpp
test/verify/aoj-grl-1-a-2.test.cpp
test/verify/aoj-grl-1-a-3.test.cpp
test/verify/aoj-grl-1-a.test.cpp
test/verify/aoj-grl-1-b-2.test.cpp
test/verify/aoj-grl-1-b.test.cpp
test/verify/aoj-grl-1-c.test.cpp
test/verify/aoj-grl-2-a-2.test.cpp
test/verify/aoj-grl-2-a-3.test.cpp
test/verify/aoj-grl-2-a-4.test.cpp
test/verify/aoj-grl-2-a.test.cpp
test/verify/aoj-grl-2-b.test.cpp
test/verify/aoj-grl-3-a.test.cpp
test/verify/aoj-grl-3-b.test.cpp
test/verify/aoj-grl-3-c.test.cpp
test/verify/aoj-grl-5-a-3.test.cpp
test/verify/aoj-grl-5-a.test.cpp
test/verify/aoj-grl-5-c-2.test.cpp
test/verify/aoj-grl-5-c-3.test.cpp
test/verify/aoj-grl-5-c-4.test.cpp
test/verify/aoj-grl-5-c.test.cpp
test/verify/aoj-grl-6-a-2.test.cpp
test/verify/aoj-grl-6-a-3.test.cpp
test/verify/aoj-grl-6-a-4.test.cpp
test/verify/aoj-grl-6-a.test.cpp
test/verify/aoj-grl-6-b.test.cpp
test/verify/aoj-grl-7-a.test.cpp
test/verify/aoj-itp1-3-d.test.cpp
test/verify/aoj-ntl-1-a.test.cpp
test/verify/aoj-ntl-1-b.test.cpp
test/verify/aoj-ntl-1-d.test.cpp
test/verify/aoj-ntl-1-e.test.cpp
test/verify/yosupo-area-of-union-of-rectangles.test.cpp
test/verify/yosupo-assignment.test.cpp
test/verify/yosupo-bernoulli-number.test.cpp
Expand All @@ -111,7 +42,6 @@ test/verify/yosupo-bitwise-and-convolution-2.test.cpp
test/verify/yosupo-bitwise-and-convolution-3.test.cpp
test/verify/yosupo-bitwise-and-convolution.test.cpp
test/verify/yosupo-bitwise-xor-convolution.test.cpp
test/verify/yosupo-cartesian-tree.test.cpp
test/verify/yosupo-chromatic-number.test.cpp
test/verify/yosupo-composition-of-formal-power-series-large.test.cpp
test/verify/yosupo-compositional-inverse-of-formal-power-series-large.test.cpp
Expand All @@ -131,11 +61,9 @@ test/verify/yosupo-dynamic-tree-vertex-add-subtree-sum-3.test.cpp
test/verify/yosupo-dynamic-tree-vertex-set-path-composite-4.test.cpp
test/verify/yosupo-eertree.test.cpp
test/verify/yosupo-enumerate-palindromes.test.cpp
test/verify/yosupo-enumerate-primes.test.cpp
test/verify/yosupo-enumerate-quotients.test.cpp
test/verify/yosupo-enumerate-triangles.test.cpp
test/verify/yosupo-exp-of-formal-power-series.test.cpp
test/verify/yosupo-factorize.test.cpp
test/verify/yosupo-find-linear-recurrence.test.cpp
test/verify/yosupo-frequency-table-of-tree-distance.test.cpp
test/verify/yosupo-general-matching.test.cpp
Expand All @@ -144,10 +72,6 @@ test/verify/yosupo-inv-of-formal-power-series.test.cpp
test/verify/yosupo-k-shortest-walk.test.cpp
test/verify/yosupo-kth-root-integer.test.cpp
test/verify/yosupo-kth-term-of-linearly-recurrent-sequence.test.cpp
test/verify/yosupo-lca-2.test.cpp
test/verify/yosupo-lca-3.test.cpp
test/verify/yosupo-lca-4.test.cpp
test/verify/yosupo-lca.test.cpp
test/verify/yosupo-line-add-get-min-2.test.cpp
test/verify/yosupo-line-add-get-min.test.cpp
test/verify/yosupo-log-of-formal-power-series.test.cpp
Expand All @@ -161,7 +85,6 @@ test/verify/yosupo-multipoint-evaluation.test.cpp
test/verify/yosupo-number-of-increasing-sequences-between-two-sequences.test.cpp
test/verify/yosupo-number-of-substrings.test.cpp
test/verify/yosupo-partition-function.test.cpp
test/verify/yosupo-persistent-unionfind.test.cpp
test/verify/yosupo-point-add-rectangle-sum-2.test.cpp
test/verify/yosupo-point-add-rectangle-sum-3.test.cpp
test/verify/yosupo-point-add-rectangle-sum-4.test.cpp
Expand All @@ -174,23 +97,17 @@ test/verify/yosupo-point-set-tree-path-composite-sum.test.cpp
test/verify/yosupo-polynomial-interpolation.test.cpp
test/verify/yosupo-polynomial-taylor-shift.test.cpp
test/verify/yosupo-pow-of-formal-power-series.test.cpp
test/verify/yosupo-primality-test.test.cpp
test/verify/yosupo-queue-operate-all-composite.test.cpp
test/verify/yosupo-range-affine-point-get.test.cpp
test/verify/yosupo-range-affine-range-sum-2.test.cpp
test/verify/yosupo-range-affine-range-sum-3.test.cpp
test/verify/yosupo-range-affine-range-sum.test.cpp
test/verify/yosupo-range-chmin-chmax-add-range-sum.test.cpp
test/verify/yosupo-range-kth-smallest-2.test.cpp
test/verify/yosupo-range-kth-smallest-3.test.cpp
test/verify/yosupo-range-kth-smallest.test.cpp
test/verify/yosupo-range-linear-add-range-min.test.cpp
test/verify/yosupo-rectangle-add-point-get.test.cpp
test/verify/yosupo-rectangle-sum-2.test.cpp
test/verify/yosupo-rectangle-sum.test.cpp
test/verify/yosupo-scc.test.cpp
test/verify/yosupo-segment-add-get-min.test.cpp
test/verify/yosupo-set-xor-min.test.cpp
test/verify/yosupo-sharp-p-subset-sum.test.cpp
test/verify/yosupo-shift-of-sampling-points-of-polynomial.test.cpp
test/verify/yosupo-shortest-path.test.cpp
Expand All @@ -200,28 +117,18 @@ test/verify/yosupo-sqrt-of-formal-power-series.test.cpp
test/verify/yosupo-static-range-count-distinct.test.cpp
test/verify/yosupo-static-range-frequency.test.cpp
test/verify/yosupo-static-range-inversions-query.test.cpp
test/verify/yosupo-static-range-sum.test.cpp
test/verify/yosupo-static-rectangle-add-rectangle-sum.test.cpp
test/verify/yosupo-staticrmq-2.test.cpp
test/verify/yosupo-staticrmq-3.test.cpp
test/verify/yosupo-staticrmq-4.test.cpp
test/verify/yosupo-staticrmq-5.test.cpp
test/verify/yosupo-staticrmq-6.test.cpp
test/verify/yosupo-staticrmq.test.cpp
test/verify/yosupo-stirling-number-of-the-first-kind.test.cpp
test/verify/yosupo-stirling-number-of-the-second-kind.test.cpp
test/verify/yosupo-subset-convolution.test.cpp
test/verify/yosupo-suffixarray.test.cpp
test/verify/yosupo-sum-of-floor-of-linear.test.cpp
test/verify/yosupo-tetration-mod.test.cpp
test/verify/yosupo-three-edge-connected-components.test.cpp
test/verify/yosupo-tree-decomposition-width-2.test.cpp
test/verify/yosupo-tree-diameter.test.cpp
test/verify/yosupo-two-edge-connected-components-2.test.cpp
test/verify/yosupo-two-edge-connected-components.test.cpp
test/verify/yosupo-two-sat.test.cpp
test/verify/yosupo-wildcard-pattern-matching.test.cpp
test/verify/yosupo-zalgorithm.test.cpp
test/verify/yukicoder-1002.test.cpp
test/verify/yukicoder-1069.test.cpp
test/verify/yukicoder-1236.test.cpp
Expand Down
8 changes: 6 additions & 2 deletions test/verify/aoj-alds-1-1-c-2.test.cpp
Original file line number Diff line number Diff line change
@@ -1,15 +1,19 @@
// clang-format off
// competitive-verifier: PROBLEM http://judge.u-aizu.ac.jp/onlinejudge/description.jsp?id=ALDS1_1_C
// clang-format on

#include "../../template/template.hpp"
#include <iostream>

#include "../../math/number-theory/prime-table.hpp"

using namespace std;

int main() {
auto t = prime_table(100000000);
int N;
cin >> N;
int ret = 0;
while(N--) {
while (N--) {
int x;
cin >> x;
ret += t[x];
Expand Down
9 changes: 6 additions & 3 deletions test/verify/aoj-alds-1-1-c.test.cpp
Original file line number Diff line number Diff line change
@@ -1,18 +1,21 @@
// clang-format off
// competitive-verifier: PROBLEM http://judge.u-aizu.ac.jp/onlinejudge/description.jsp?id=ALDS1_1_C
// clang-format on

#include "../../template/template.hpp"
#include <iostream>

#include "../../math/number-theory/is-prime.hpp"

using namespace std;

int main() {
int N;
cin >> N;
int ret = 0;
while(N--) {
while (N--) {
int x;
cin >> x;
ret += is_prime(x);
}
cout << ret << endl;
}

19 changes: 12 additions & 7 deletions test/verify/aoj-alds-1-11-c.test.cpp
Original file line number Diff line number Diff line change
@@ -1,30 +1,35 @@
// clang-format off
// competitive-verifier: PROBLEM http://judge.u-aizu.ac.jp/onlinejudge/description.jsp?id=ALDS1_11_C
// clang-format on

#include "../../template/template.hpp"
#include <iostream>
#include <limits>

#include "../../graph/shortest-path/bfs.hpp"

using namespace std;

int main() {
int N;
cin >> N;
Graph<> g(N);
for(int i = 0; i < N; i++) {
for (int i = 0; i < N; i++) {
int U, K;
cin >> U >> K;
--U;
for(int j = 0; j < K; j++) {
for (int j = 0; j < K; j++) {
int x;
cin >> x;
--x;
g.add_directed_edge(U, x);
}
}
auto d = bfs(g, 0);
for(int i = 0; i < N; i++) {
for (int i = 0; i < N; i++) {
cout << i + 1 << " ";
if(d[i] == numeric_limits< int >::max()) cout << -1 << "\n";
else cout << d[i] << "\n";
if (d[i] == numeric_limits<int>::max())
cout << -1 << "\n";
else
cout << d[i] << "\n";
}
}

11 changes: 8 additions & 3 deletions test/verify/aoj-alds-1-14-b.test.cpp
Original file line number Diff line number Diff line change
@@ -1,16 +1,21 @@
// clang-format off
// competitive-verifier: PROBLEM http://judge.u-aizu.ac.jp/onlinejudge/description.jsp?id=ALDS1_14_B
// clang-format on

#include "../../template/template.hpp"
#include <iostream>
#include <string>

#include "../../string/rolling-hash.hpp"

using namespace std;

int main() {
string T, P;
cin >> T;
cin >> P;
RollingHash rh1(T), rh2(P);
for(int i = 0; i + P.size() <= T.size(); i++) {
if(rh1.get(i, i + P.size()) == rh2.get(0, P.size())) {
for (int i = 0; i + P.size() <= T.size(); i++) {
if (rh1.get(i, i + P.size()) == rh2.get(0, P.size())) {
cout << i << endl;
}
}
Expand Down
9 changes: 7 additions & 2 deletions test/verify/aoj-alds-1-14-d.test.cpp
Original file line number Diff line number Diff line change
@@ -1,17 +1,22 @@
// clang-format off
// competitive-verifier: PROBLEM http://judge.u-aizu.ac.jp/onlinejudge/description.jsp?id=ALDS1_14_D
// clang-format on

#include "../../template/template.hpp"
#include <iostream>
#include <string>

#include "../../string/suffix-array.hpp"

using namespace std;

int main() {
string S;
int Q;

cin >> S;
SuffixArray sa(S);
cin >> Q;
while(Q--) {
while (Q--) {
string T;
cin >> T;
auto range = sa.equal_range(T);
Expand Down
13 changes: 9 additions & 4 deletions test/verify/aoj-alds-1-9-c.test.cpp
Original file line number Diff line number Diff line change
@@ -1,15 +1,20 @@
// clang-format off
// competitive-verifier: PROBLEM http://judge.u-aizu.ac.jp/onlinejudge/description.jsp?id=ALDS1_9_C
// clang-format on

#include "../../template/template.hpp"
#include <iostream>
#include <string>

#include "../../structure/heap/leftist-heap.hpp"

using namespace std;

int main() {
string s;
LeftistHeap< int, false > que;
LeftistHeap<int, false> que;
auto root = que.make_root();
while(cin >> s, s != "end") {
if(s == "insert") {
while (cin >> s, s != "end") {
if (s == "insert") {
int x;
cin >> x;
root = que.push(root, x);
Expand Down
Loading
Loading