From d4ecca64e9cb16c6e226fb78cba893a130774061 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Fri, 27 Mar 2026 09:18:53 +0000 Subject: [PATCH 1/3] Initial plan From f8946d0b369c3cbf642c8d9a53f65428f2aae3dd Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Fri, 27 Mar 2026 09:24:20 +0000 Subject: [PATCH 2/3] =?UTF-8?q?Add=20I/O=20optimizations=20(sync=5Fwith=5F?= =?UTF-8?q?stdio,=20cin.tie,=20endl=E2=86=92"\\n")=20to=20all=20test=20fil?= =?UTF-8?q?es?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Agent-Logs-Url: https://github.com/blue-jam/ProconLibrary/sessions/3368249e-cd17-4fa9-a5b3-fc03c09bcae1 Co-authored-by: blue-jam <9583566+blue-jam@users.noreply.github.com> --- datastructure/fenwick.dsl_2_b.test.cpp | 4 +++- datastructure/lazysegtree.aoj1351.test.cpp | 4 +++- datastructure/segmenttree.dsl_2_a.test.cpp | 4 +++- geometry/arrangement.aoj1279.test.cpp | 8 +++++--- geometry/arrangement.aoj2448.test.cpp | 4 +++- geometry/closestpair.cgl_5_a.test.cpp | 4 +++- geometry/convexcut.cgl_4_c.test.cpp | 4 +++- geometry/convexhull.cgl_4_a.test.cpp | 6 ++++-- geometry/crosspoint.aoj2402.test.cpp | 4 +++- geometry/crosspoint.cgl_2_b.test.cpp | 4 +++- geometry/crosspoint.cgl_2_c.test.cpp | 4 +++- geometry/crosspoint.cgl_2_d.test.cpp | 4 +++- geometry/crosspoint.cgl_7_d.test.cpp | 4 +++- geometry/crosspoint.cgl_7_e.test.cpp | 4 +++- geometry/geometry.cgl_1_a.test.cpp | 4 +++- geometry/geometry.cgl_1_b.test.cpp | 4 +++- geometry/geometry.cgl_1_c.test.cpp | 12 +++++++----- geometry/geometry.cgl_2_a.test.cpp | 4 +++- geometry/polygon.cgl_3_a.test.cpp | 4 +++- geometry/polygon.cgl_3_b.test.cpp | 4 +++- geometry/polygon.cgl_3_c.test.cpp | 8 +++++--- geometry/tangent.cgl_7_a.test.cpp | 4 +++- geometry/tangent.cgl_7_g.test.cpp | 4 +++- graph/articulation.grl_3_a.test.cpp | 4 +++- graph/bellman.grl_1_b.test.cpp | 8 +++++--- graph/bridge.grl_3_b.test.cpp | 4 +++- graph/dijkstra.grl_1_a.test.cpp | 6 ++++-- graph/kruskal.grl_2_a.test.cpp | 4 +++- graph/lca.grl_5_c.test.cpp | 4 +++- graph/scc.grl_3_c.test.cpp | 4 +++- graph/topologicalsort.grl_4_b.test.cpp | 4 +++- 31 files changed, 105 insertions(+), 43 deletions(-) diff --git a/datastructure/fenwick.dsl_2_b.test.cpp b/datastructure/fenwick.dsl_2_b.test.cpp index dd9d929..b729ae3 100644 --- a/datastructure/fenwick.dsl_2_b.test.cpp +++ b/datastructure/fenwick.dsl_2_b.test.cpp @@ -3,6 +3,8 @@ #include "misc/template.hpp" int main() { + ios_base::sync_with_stdio(false); + cin.tie(NULL); int n, q; cin >> n >> q; Fenwick bit(n + 1); @@ -12,7 +14,7 @@ int main() { if (c == 0) { bit.add(x, y); } else { - cout << bit.get(y) - bit.get(x - 1) << endl; + cout << bit.get(y) - bit.get(x - 1) << "\n"; } } return 0; diff --git a/datastructure/lazysegtree.aoj1351.test.cpp b/datastructure/lazysegtree.aoj1351.test.cpp index 36d7901..a339e1d 100644 --- a/datastructure/lazysegtree.aoj1351.test.cpp +++ b/datastructure/lazysegtree.aoj1351.test.cpp @@ -5,6 +5,8 @@ int N, Q; string s; int main() { + ios_base::sync_with_stdio(false); + cin.tie(NULL); cin >> N >> Q >> s; vector v(N), q(Q); set cl; @@ -46,7 +48,7 @@ int main() { s[l] = ')'; st.add(l, N, -2); } - cout << l + 1 << endl; + cout << l + 1 << "\n"; } return 0; } diff --git a/datastructure/segmenttree.dsl_2_a.test.cpp b/datastructure/segmenttree.dsl_2_a.test.cpp index e40077a..a8bc1f5 100644 --- a/datastructure/segmenttree.dsl_2_a.test.cpp +++ b/datastructure/segmenttree.dsl_2_a.test.cpp @@ -3,6 +3,8 @@ #include "misc/template.hpp" int main() { + ios_base::sync_with_stdio(false); + cin.tie(NULL); int n, q; cin >> n >> q; SegmentTree st(n, INT_MAX); @@ -13,7 +15,7 @@ int main() { if (c == 0) st.update(x, y); else - cout << st.query(x, y + 1) << endl; + cout << st.query(x, y + 1) << "\n"; } return 0; } diff --git a/geometry/arrangement.aoj1279.test.cpp b/geometry/arrangement.aoj1279.test.cpp index f3c5bd9..b713b1b 100644 --- a/geometry/arrangement.aoj1279.test.cpp +++ b/geometry/arrangement.aoj1279.test.cpp @@ -11,6 +11,8 @@ const double INF = 1e+10; #include "graph/graph.hpp" int main() { + ios_base::sync_with_stdio(false); + cin.tie(NULL); for (;;) { int n; cin >> n; @@ -68,13 +70,13 @@ int main() { vector dist(ps.size()); dijkstra(graph, si, dist, prev); if (dist[gi] == INF) { - cout << -1 << endl; + cout << -1 << "\n"; } else { vector path = buildPath(prev, gi); for (const auto& v : path) { - cout << (int)ps[v].real() << " " << (int)ps[v].imag() << endl; + cout << (int)ps[v].real() << " " << (int)ps[v].imag() << "\n"; } - cout << 0 << endl; + cout << 0 << "\n"; } } } diff --git a/geometry/arrangement.aoj2448.test.cpp b/geometry/arrangement.aoj2448.test.cpp index 71eb68e..5df0d0c 100644 --- a/geometry/arrangement.aoj2448.test.cpp +++ b/geometry/arrangement.aoj2448.test.cpp @@ -10,6 +10,8 @@ #include "graph/graph.hpp" int main() { + ios_base::sync_with_stdio(false); + cin.tie(NULL); int N; cin >> N; vector

ps(N); @@ -35,6 +37,6 @@ int main() { sort(ALL(res)); for (const auto& r : res) sum += r; - cout << fixed << setprecision(5) << sum << endl; + cout << fixed << setprecision(5) << sum << "\n"; return 0; } diff --git a/geometry/closestpair.cgl_5_a.test.cpp b/geometry/closestpair.cgl_5_a.test.cpp index 9b039e0..69d55b0 100644 --- a/geometry/closestpair.cgl_5_a.test.cpp +++ b/geometry/closestpair.cgl_5_a.test.cpp @@ -5,6 +5,8 @@ #include "misc/template.hpp" int main() { + ios_base::sync_with_stdio(false); + cin.tie(NULL); int n; cin >> n; vector

v(n); @@ -13,6 +15,6 @@ int main() { cin >> x >> y; v[i] = P(x, y); } - cout << fixed << setprecision(10) << closestPair(v) << endl; + cout << fixed << setprecision(10) << closestPair(v) << "\n"; return 0; } diff --git a/geometry/convexcut.cgl_4_c.test.cpp b/geometry/convexcut.cgl_4_c.test.cpp index df0cea3..9fa4840 100644 --- a/geometry/convexcut.cgl_4_c.test.cpp +++ b/geometry/convexcut.cgl_4_c.test.cpp @@ -7,6 +7,8 @@ #include "misc/template.hpp" int main() { + ios_base::sync_with_stdio(false); + cin.tie(NULL); int n; cin >> n; Polygon p; @@ -22,7 +24,7 @@ int main() { int x1, x2, y1, y2; cin >> x1 >> y1 >> x2 >> y2; Polygon Q = convex_cut(p, Line(P(x1, y1), P(x2, y2))); - cout << area(Q) << endl; + cout << area(Q) << "\n"; } return 0; } diff --git a/geometry/convexhull.cgl_4_a.test.cpp b/geometry/convexhull.cgl_4_a.test.cpp index 83fcc48..7d060be 100644 --- a/geometry/convexhull.cgl_4_a.test.cpp +++ b/geometry/convexhull.cgl_4_a.test.cpp @@ -4,6 +4,8 @@ #include "misc/template.hpp" int main() { + ios_base::sync_with_stdio(false); + cin.tie(NULL); int n; cin >> n; vector

v(n); @@ -19,9 +21,9 @@ int main() { if (lessY(p[i], p[idx])) idx = i; } - cout << m << endl; + cout << m << "\n"; for (int i = 0; i < m; ++i) { - cout << (int)p[(idx + i) % m].real() << " " << (int)p[(idx + i) % m].imag() << endl; + cout << (int)p[(idx + i) % m].real() << " " << (int)p[(idx + i) % m].imag() << "\n"; } return 0; } diff --git a/geometry/crosspoint.aoj2402.test.cpp b/geometry/crosspoint.aoj2402.test.cpp index 772919d..ae855cb 100644 --- a/geometry/crosspoint.aoj2402.test.cpp +++ b/geometry/crosspoint.aoj2402.test.cpp @@ -69,6 +69,8 @@ vector star(int x, int y, int a, int r) { } int main() { + ios_base::sync_with_stdio(false); + cin.tie(NULL); for (;;) { int N, M, L; cin >> N >> M >> L; @@ -91,6 +93,6 @@ int main() { vector dist(N); vector prev(N); dijkstra(g, M - 1, dist, prev); - cout << fixed << setprecision(10) << dist[L - 1] << endl; + cout << fixed << setprecision(10) << dist[L - 1] << "\n"; } } diff --git a/geometry/crosspoint.cgl_2_b.test.cpp b/geometry/crosspoint.cgl_2_b.test.cpp index 3d8d26c..fcbe530 100644 --- a/geometry/crosspoint.cgl_2_b.test.cpp +++ b/geometry/crosspoint.cgl_2_b.test.cpp @@ -4,6 +4,8 @@ #include "misc/template.hpp" int main() { + ios_base::sync_with_stdio(false); + cin.tie(NULL); int q; cin >> q; for (int i = 0; i < q; ++i) { @@ -13,7 +15,7 @@ int main() { cin >> a >> b >> c >> d; L.push_back(Segment(P(a, b), P(c, d))); } - cout << (intersectSS(L[0], L[1]) ? 1 : 0) << endl; + cout << (intersectSS(L[0], L[1]) ? 1 : 0) << "\n"; } return 0; } diff --git a/geometry/crosspoint.cgl_2_c.test.cpp b/geometry/crosspoint.cgl_2_c.test.cpp index 60ed7df..6723ebb 100644 --- a/geometry/crosspoint.cgl_2_c.test.cpp +++ b/geometry/crosspoint.cgl_2_c.test.cpp @@ -4,6 +4,8 @@ #include "geometry/geometry.hpp" #include "misc/template.hpp" int main() { + ios_base::sync_with_stdio(false); + cin.tie(NULL); int q; cin >> q; for (int i = 0; i < q; ++i) { @@ -15,6 +17,6 @@ int main() { } P p = crosspointSS(L[0], L[1]); cout << fixed << setprecision(10); - cout << real(p) << " " << imag(p) << endl; + cout << real(p) << " " << imag(p) << "\n"; } } diff --git a/geometry/crosspoint.cgl_2_d.test.cpp b/geometry/crosspoint.cgl_2_d.test.cpp index 1b35e9c..a697e63 100644 --- a/geometry/crosspoint.cgl_2_d.test.cpp +++ b/geometry/crosspoint.cgl_2_d.test.cpp @@ -5,6 +5,8 @@ #include "misc/template.hpp" int main() { + ios_base::sync_with_stdio(false); + cin.tie(NULL); int q; cin >> q; for (int i = 0; i < q; ++i) { @@ -15,7 +17,7 @@ int main() { L.push_back(Segment(P(a, b), P(c, d))); } cout << fixed << setprecision(11); - cout << distanceSS(L[0], L[1]) << endl; + cout << distanceSS(L[0], L[1]) << "\n"; } return 0; } diff --git a/geometry/crosspoint.cgl_7_d.test.cpp b/geometry/crosspoint.cgl_7_d.test.cpp index 9c80a3d..f82ebcc 100644 --- a/geometry/crosspoint.cgl_7_d.test.cpp +++ b/geometry/crosspoint.cgl_7_d.test.cpp @@ -5,6 +5,8 @@ #include "misc/template.hpp" int main() { + ios_base::sync_with_stdio(false); + cin.tie(NULL); int x, y, r, q; cin >> x >> y >> r >> q; Circle C(x, y, r); @@ -19,7 +21,7 @@ int main() { cout << fixed << setprecision(10) << real(vp[j]) << " " << imag(vp[j]); if (j == 0) cout << " "; } - cout << endl; + cout << "\n"; } return 0; } diff --git a/geometry/crosspoint.cgl_7_e.test.cpp b/geometry/crosspoint.cgl_7_e.test.cpp index 4984732..38a8a81 100644 --- a/geometry/crosspoint.cgl_7_e.test.cpp +++ b/geometry/crosspoint.cgl_7_e.test.cpp @@ -5,6 +5,8 @@ #include "misc/template.hpp" int main() { + ios_base::sync_with_stdio(false); + cin.tie(NULL); vector v; for (int i = 0; i < 2; ++i) { int x, y, r; @@ -15,6 +17,6 @@ int main() { if (!lessX(ps.first, ps.second)) swap(ps.first, ps.second); cout << fixed << setprecision(10); cout << real(ps.first) << " " << imag(ps.first) << " "; - cout << real(ps.second) << " " << imag(ps.second) << endl; + cout << real(ps.second) << " " << imag(ps.second) << "\n"; return 0; } diff --git a/geometry/geometry.cgl_1_a.test.cpp b/geometry/geometry.cgl_1_a.test.cpp index ffb3799..5cab04a 100644 --- a/geometry/geometry.cgl_1_a.test.cpp +++ b/geometry/geometry.cgl_1_a.test.cpp @@ -4,6 +4,8 @@ #include "misc/template.hpp" int main() { + ios_base::sync_with_stdio(false); + cin.tie(NULL); int x1, x2, y1, y2, q; cin >> x1 >> y1 >> x2 >> y2 >> q; Line L(P(x1, y1), P(x2, y2)); @@ -12,7 +14,7 @@ int main() { cin >> x >> y; P p = projection(L, P(x, y)); cout << fixed << setprecision(10); - cout << real(p) << " " << imag(p) << endl; + cout << real(p) << " " << imag(p) << "\n"; } return 0; } diff --git a/geometry/geometry.cgl_1_b.test.cpp b/geometry/geometry.cgl_1_b.test.cpp index 2c56bed..9581fcb 100644 --- a/geometry/geometry.cgl_1_b.test.cpp +++ b/geometry/geometry.cgl_1_b.test.cpp @@ -4,6 +4,8 @@ #include "misc/template.hpp" int main() { + ios_base::sync_with_stdio(false); + cin.tie(NULL); int x1, x2, y1, y2, q; cin >> x1 >> y1 >> x2 >> y2 >> q; Line L(P(x1, y1), P(x2, y2)); @@ -12,7 +14,7 @@ int main() { cin >> x >> y; P p = reflection(L, P(x, y)); cout << fixed << setprecision(10); - cout << real(p) << " " << imag(p) << endl; + cout << real(p) << " " << imag(p) << "\n"; } return 0; } diff --git a/geometry/geometry.cgl_1_c.test.cpp b/geometry/geometry.cgl_1_c.test.cpp index d3efb99..9bf4765 100644 --- a/geometry/geometry.cgl_1_c.test.cpp +++ b/geometry/geometry.cgl_1_c.test.cpp @@ -3,6 +3,8 @@ #include "misc/template.hpp" int main() { + ios_base::sync_with_stdio(false); + cin.tie(NULL); int x1, x2, y1, y2, q; cin >> x1 >> y1 >> x2 >> y2 >> q; Line L(P(x1, y1), P(x2, y2)); @@ -10,11 +12,11 @@ int main() { int x, y; cin >> x >> y; int c = ccw(L[0], L[1], P(x, y)); - if (c == 0) cout << "ON_SEGMENT" << endl; - else if (c == 2) cout << "ONLINE_BACK" << endl; - else if (c == -2) cout << "ONLINE_FRONT" << endl; - else if (c == 1) cout << "COUNTER_CLOCKWISE" << endl; - else cout << "CLOCKWISE" << endl; + if (c == 0) cout << "ON_SEGMENT" << "\n"; + else if (c == 2) cout << "ONLINE_BACK" << "\n"; + else if (c == -2) cout << "ONLINE_FRONT" << "\n"; + else if (c == 1) cout << "COUNTER_CLOCKWISE" << "\n"; + else cout << "CLOCKWISE" << "\n"; } return 0; } diff --git a/geometry/geometry.cgl_2_a.test.cpp b/geometry/geometry.cgl_2_a.test.cpp index 966f60f..bb12d2c 100644 --- a/geometry/geometry.cgl_2_a.test.cpp +++ b/geometry/geometry.cgl_2_a.test.cpp @@ -3,6 +3,8 @@ #include "misc/template.hpp" int main() { + ios_base::sync_with_stdio(false); + cin.tie(NULL); int q; cin >> q; for (int i = 0; i < q; ++i) { @@ -15,7 +17,7 @@ int main() { int r = 0; if (parallel(L[0], L[1])) r = 2; else if (orthogonal(L[0], L[1])) r = 1; - cout << r << endl; + cout << r << "\n"; } return 0; } diff --git a/geometry/polygon.cgl_3_a.test.cpp b/geometry/polygon.cgl_3_a.test.cpp index 9847b4d..6c3beeb 100644 --- a/geometry/polygon.cgl_3_a.test.cpp +++ b/geometry/polygon.cgl_3_a.test.cpp @@ -4,6 +4,8 @@ #include "misc/template.hpp" int main() { + ios_base::sync_with_stdio(false); + cin.tie(NULL); int n; cin >> n; Polygon p(n); @@ -13,6 +15,6 @@ int main() { p[i] = P(x, y); } cout << fixed << setprecision(1); - cout << area(p) << endl; + cout << area(p) << "\n"; return 0; } diff --git a/geometry/polygon.cgl_3_b.test.cpp b/geometry/polygon.cgl_3_b.test.cpp index 7645101..e4aae42 100644 --- a/geometry/polygon.cgl_3_b.test.cpp +++ b/geometry/polygon.cgl_3_b.test.cpp @@ -4,6 +4,8 @@ #include "misc/template.hpp" int main() { + ios_base::sync_with_stdio(false); + cin.tie(NULL); int n; cin >> n; Polygon p(n); @@ -12,6 +14,6 @@ int main() { cin >> x >> y; p[i] = P(x, y); } - cout << (convex(p) ? 1 : 0) << endl; + cout << (convex(p) ? 1 : 0) << "\n"; return 0; } diff --git a/geometry/polygon.cgl_3_c.test.cpp b/geometry/polygon.cgl_3_c.test.cpp index 483bc93..36d2270 100644 --- a/geometry/polygon.cgl_3_c.test.cpp +++ b/geometry/polygon.cgl_3_c.test.cpp @@ -4,6 +4,8 @@ #include "misc/template.hpp" int main() { + ios_base::sync_with_stdio(false); + cin.tie(NULL); int n; cin >> n; Polygon p(n); @@ -18,9 +20,9 @@ int main() { int x, y; cin >> x >> y; int c = contains(p, P(x, y)); - if (c == OUT) cout << 0 << endl; - else if (c == ON) cout << 1 << endl; - else cout << 2 << endl; + if (c == OUT) cout << 0 << "\n"; + else if (c == ON) cout << 1 << "\n"; + else cout << 2 << "\n"; } return 0; } diff --git a/geometry/tangent.cgl_7_a.test.cpp b/geometry/tangent.cgl_7_a.test.cpp index ea2a62a..b4e2287 100644 --- a/geometry/tangent.cgl_7_a.test.cpp +++ b/geometry/tangent.cgl_7_a.test.cpp @@ -4,11 +4,13 @@ #include "misc/template.hpp" int main() { + ios_base::sync_with_stdio(false); + cin.tie(NULL); double x1, y1, r1, x2, y2, r2; cin >> x1 >> y1 >> r1; Circle c1(x1, y1, r1); cin >> x2 >> y2 >> r2; Circle c2(x2, y2, r2); - cout << innertangent(c1, c2).size() + outertangent(c1, c2).size() << endl; + cout << innertangent(c1, c2).size() + outertangent(c1, c2).size() << "\n"; return 0; } diff --git a/geometry/tangent.cgl_7_g.test.cpp b/geometry/tangent.cgl_7_g.test.cpp index 45f47ef..489263b 100644 --- a/geometry/tangent.cgl_7_g.test.cpp +++ b/geometry/tangent.cgl_7_g.test.cpp @@ -5,6 +5,8 @@ #include "misc/template.hpp" int main() { + ios_base::sync_with_stdio(false); + cin.tie(NULL); double x1, y1, r1, x2, y2, r2; cin >> x1 >> y1 >> r1; Circle c1(x1, y1, r1); @@ -19,7 +21,7 @@ int main() { sort(ALL(v), lessX); cout << fixed << setprecision(10); for (const auto& p : v) { - cout << p.real() << " " << p.imag() << endl; + cout << p.real() << " " << p.imag() << "\n"; } return 0; } diff --git a/graph/articulation.grl_3_a.test.cpp b/graph/articulation.grl_3_a.test.cpp index 2753ee2..9a6ad3b 100644 --- a/graph/articulation.grl_3_a.test.cpp +++ b/graph/articulation.grl_3_a.test.cpp @@ -4,6 +4,8 @@ #include "misc/template.hpp" int main() { + ios_base::sync_with_stdio(false); + cin.tie(NULL); int V, E; cin >> V >> E; Graph g(V); @@ -17,6 +19,6 @@ int main() { getArticulation(g, art, comp); sort(ALL(art)); for (auto a : art) - cout << a << endl; + cout << a << "\n"; return 0; } diff --git a/graph/bellman.grl_1_b.test.cpp b/graph/bellman.grl_1_b.test.cpp index 6ea3c33..c018cbb 100644 --- a/graph/bellman.grl_1_b.test.cpp +++ b/graph/bellman.grl_1_b.test.cpp @@ -5,6 +5,8 @@ const int INF = 1000000010; #include "graph/bellman.hpp" int main() { + ios_base::sync_with_stdio(false); + cin.tie(NULL); int V, E, r; cin >> V >> E >> r; Graph g(V); @@ -18,14 +20,14 @@ int main() { bool res = bellmanFord(g, r, dist, prev); if (res) { - cout << "NEGATIVE CYCLE" << endl; + cout << "NEGATIVE CYCLE" << "\n"; return 0; } for (int a : dist) { if (a == INF) - cout << "INF" << endl; + cout << "INF" << "\n"; else - cout << a << endl; + cout << a << "\n"; } return 0; } diff --git a/graph/bridge.grl_3_b.test.cpp b/graph/bridge.grl_3_b.test.cpp index 1f09cb3..22e8e1d 100644 --- a/graph/bridge.grl_3_b.test.cpp +++ b/graph/bridge.grl_3_b.test.cpp @@ -9,6 +9,8 @@ bool func(const Edge& a, const Edge& b) { } int main() { + ios_base::sync_with_stdio(false); + cin.tie(NULL); int V, E; cin >> V >> E; Graph g(V); @@ -25,6 +27,6 @@ int main() { swap(br.from, br.to); sort(ALL(brg), func); for (auto b : brg) - cout << b.from << " " << b.to << endl; + cout << b.from << " " << b.to << "\n"; return 0; } diff --git a/graph/dijkstra.grl_1_a.test.cpp b/graph/dijkstra.grl_1_a.test.cpp index 7b6b5ee..cda115b 100644 --- a/graph/dijkstra.grl_1_a.test.cpp +++ b/graph/dijkstra.grl_1_a.test.cpp @@ -5,6 +5,8 @@ const int INF = 1000000010; #include "graph/dijkstra.hpp" int main() { + ios_base::sync_with_stdio(false); + cin.tie(NULL); int V, E, r; cin >> V >> E >> r; Graph g(V); @@ -19,9 +21,9 @@ int main() { dijkstra(g, r, dist, prev); for (int a : dist) { if (a == INF) - cout << "INF" << endl; + cout << "INF" << "\n"; else - cout << a << endl; + cout << a << "\n"; } return 0; } diff --git a/graph/kruskal.grl_2_a.test.cpp b/graph/kruskal.grl_2_a.test.cpp index 35c3ae9..78c90aa 100644 --- a/graph/kruskal.grl_2_a.test.cpp +++ b/graph/kruskal.grl_2_a.test.cpp @@ -5,6 +5,8 @@ #include "misc/template.hpp" int main() { + ios_base::sync_with_stdio(false); + cin.tie(NULL); int V, E; cin >> V >> E; Edges es; @@ -13,6 +15,6 @@ int main() { cin >> s >> t >> w; es.push_back(Edge(s, t, w)); } - cout << kruskal_e(es, V).first << endl; + cout << kruskal_e(es, V).first << "\n"; return 0; } diff --git a/graph/lca.grl_5_c.test.cpp b/graph/lca.grl_5_c.test.cpp index 64b5089..3abed34 100644 --- a/graph/lca.grl_5_c.test.cpp +++ b/graph/lca.grl_5_c.test.cpp @@ -3,6 +3,8 @@ #include "misc/template.hpp" int main() { + ios_base::sync_with_stdio(false); + cin.tie(NULL); int n; cin >> n; vector parent(n, -1); @@ -29,7 +31,7 @@ int main() { int u, v; cin >> u >> v; int w = lca(u, v, depth, ancestor); - cout << w << endl; + cout << w << "\n"; } return 0; } diff --git a/graph/scc.grl_3_c.test.cpp b/graph/scc.grl_3_c.test.cpp index 61be217..f71548d 100644 --- a/graph/scc.grl_3_c.test.cpp +++ b/graph/scc.grl_3_c.test.cpp @@ -4,6 +4,8 @@ #include "misc/template.hpp" int main() { + ios_base::sync_with_stdio(false); + cin.tie(NULL); int V, E; cin >> V >> E; Graph g(V); @@ -22,7 +24,7 @@ int main() { for (int i = 0; i < Q; ++i) { int u, v; cin >> u >> v; - cout << (dict[u] == dict[v] ? 1 : 0) << endl; + cout << (dict[u] == dict[v] ? 1 : 0) << "\n"; } return 0; } diff --git a/graph/topologicalsort.grl_4_b.test.cpp b/graph/topologicalsort.grl_4_b.test.cpp index a116b8e..e77244f 100644 --- a/graph/topologicalsort.grl_4_b.test.cpp +++ b/graph/topologicalsort.grl_4_b.test.cpp @@ -4,6 +4,8 @@ #include "misc/template.hpp" int main() { + ios_base::sync_with_stdio(false); + cin.tie(NULL); int V, E; cin >> V >> E; Graph g(V); @@ -15,7 +17,7 @@ int main() { vector v; topologicalSort(g, v); for (auto a : v) { - cout << a << endl; + cout << a << "\n"; } return 0; } From e2a33ef347a31f40cfb0769b4a22143e49f6f1b0 Mon Sep 17 00:00:00 2001 From: blue_jam Date: Sat, 28 Mar 2026 08:50:35 +0900 Subject: [PATCH 3/3] Remove debug option for verify --- .verify-helper/config.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.verify-helper/config.toml b/.verify-helper/config.toml index 36d766c..20e9a09 100644 --- a/.verify-helper/config.toml +++ b/.verify-helper/config.toml @@ -1,3 +1,3 @@ [[languages.cpp.environments]] CXX = "g++" -CXXFLAGS = ["-std=c++23", "-O2", "-Wno-deprecated", "-Wno-cpp", "-Wno-pragma-once-outside-header", "-Wno-sign-compare", "-D_GLIBCXX_DEBUG"] +CXXFLAGS = ["-std=c++23", "-O2", "-Wno-deprecated", "-Wno-cpp", "-Wno-pragma-once-outside-header", "-Wno-sign-compare"]