From f7b276226e81ae3b6c4db6e68924b75fb3103b13 Mon Sep 17 00:00:00 2001 From: Kimiyuki Onaka Date: Wed, 1 Sep 2021 14:51:07 +0900 Subject: [PATCH] docs: Use examples/wip/tle/ directory for TLE solutions --- examples/README.md | 14 +++++++------- examples/{ => wip/tle}/abc127_e.py | 0 examples/{ => wip/tle}/abc134_c.py | 0 .../{ => wip/tle}/codefestival_2015_final_d.py | 0 examples/{ => wip/tle}/m_solutions2019_e.py | 0 examples/{ => wip/tle}/point_add_range_sum.py | 0 examples/{ => wip/tle}/yukicoder_1618.py | 0 examples/{ => wip/tle}/yukicoder_1649.py | 0 scripts/integration_tests.py | 6 +++++- scripts/make_gallery.py | 4 ++-- 10 files changed, 14 insertions(+), 10 deletions(-) rename examples/{ => wip/tle}/abc127_e.py (100%) rename examples/{ => wip/tle}/abc134_c.py (100%) rename examples/{ => wip/tle}/codefestival_2015_final_d.py (100%) rename examples/{ => wip/tle}/m_solutions2019_e.py (100%) rename examples/{ => wip/tle}/point_add_range_sum.py (100%) rename examples/{ => wip/tle}/yukicoder_1618.py (100%) rename examples/{ => wip/tle}/yukicoder_1649.py (100%) diff --git a/examples/README.md b/examples/README.md index ceecb9ca..2a0081ec 100644 --- a/examples/README.md +++ b/examples/README.md @@ -55,22 +55,22 @@ Please check also the [gallery](https://kmyk.github.io/Jikka/gallery). - AtCoder Beginner Contest 208 [B - Factorial Yen Coin](https://atcoder.jp/contests/abc208/tasks/abc208_b) - AC with a naive solution using jikka::floordiv, reverse / 愚直解が AC jikka::floordiv, reverse を使う簡単な問題 - submission at 8d1bbacd3f40a60ae8e2447c2a17a8956c7b0218: -- :hourglass: TLE `abc134_c.py` +- :hourglass: TLE `wip/tle/abc134_c.py` - AtCoder Beginner Contest 134 [C - Exception Handling](https://atcoder.jp/contests/abc134/tasks/abc134_c) - Cumulative sums from both sides / 両側からの累積和 -- :hourglass: TLE `abc127_e.py` +- :hourglass: TLE `wip/tle/abc127_e.py` - AtCoder Beginner Contest 127 [E - Cell Distance](https://atcoder.jp/contests/abc127/tasks/abc127_e) -- :hourglass: TLE `codefestival_2015_final_d.py` +- :hourglass: TLE `wip/tle/codefestival_2015_final_d.py` - CODE FESTIVAL 2015 決勝 [D - 足ゲーム II](https://atcoder.jp/contests/code-festival-2015-final-open/tasks/codefestival_2015_final_d) -- :hourglass: TLE `m_solutions2019_e.py` +- :hourglass: TLE `wip/tle/m_solutions2019_e.py` - M-SOLUTIONS Programming Contest [E - Product of Arithmetic Progression](https://atcoder.jp/contests/m-solutions2019/tasks/m_solutions2019_e?lang=ja) -- :hourglass: TLE `yukicoder_1618.py` +- :hourglass: TLE `wip/tle/yukicoder_1618.py` - yukicoder [No.1618 Convolution?](https://yukicoder.me/problems/no/1618) - imos 法 -- :hourglass: TLE `yukicoder_1649.py` +- :hourglass: TLE `wip/tle/yukicoder_1649.py` - yukicoder [No.1649 Manhattan Square](https://yukicoder.me/problems/no/1649) - segment trees with coordinate compression / 座標圧縮してセグメント木 -- :hourglass: TLE `wip/point_add_range_sum.py` +- :hourglass: TLE `wip/tle/point_add_range_sum.py` - Library Checker [Point Add Range Sum](https://judge.yosupo.jp/problem/point_add_range_sum) - A normal segment tree / 通常のセグメント木 - :warning: CE `wip/dp_w.py` diff --git a/examples/abc127_e.py b/examples/wip/tle/abc127_e.py similarity index 100% rename from examples/abc127_e.py rename to examples/wip/tle/abc127_e.py diff --git a/examples/abc134_c.py b/examples/wip/tle/abc134_c.py similarity index 100% rename from examples/abc134_c.py rename to examples/wip/tle/abc134_c.py diff --git a/examples/codefestival_2015_final_d.py b/examples/wip/tle/codefestival_2015_final_d.py similarity index 100% rename from examples/codefestival_2015_final_d.py rename to examples/wip/tle/codefestival_2015_final_d.py diff --git a/examples/m_solutions2019_e.py b/examples/wip/tle/m_solutions2019_e.py similarity index 100% rename from examples/m_solutions2019_e.py rename to examples/wip/tle/m_solutions2019_e.py diff --git a/examples/point_add_range_sum.py b/examples/wip/tle/point_add_range_sum.py similarity index 100% rename from examples/point_add_range_sum.py rename to examples/wip/tle/point_add_range_sum.py diff --git a/examples/yukicoder_1618.py b/examples/wip/tle/yukicoder_1618.py similarity index 100% rename from examples/yukicoder_1618.py rename to examples/wip/tle/yukicoder_1618.py diff --git a/examples/yukicoder_1649.py b/examples/wip/tle/yukicoder_1649.py similarity index 100% rename from examples/yukicoder_1649.py rename to examples/wip/tle/yukicoder_1649.py diff --git a/scripts/integration_tests.py b/scripts/integration_tests.py index 06eb524f..cbdd8a3d 100644 --- a/scripts/integration_tests.py +++ b/scripts/integration_tests.py @@ -189,7 +189,7 @@ def get_local_install_root() -> pathlib.Path: def find_unused_test_cases() -> List[pathlib.Path]: - scripts = list(pathlib.Path('examples').glob('*.py')) + scripts = list(pathlib.Path('examples').glob('*.py')) + list(pathlib.Path('examples', 'wip', 'tle').glob('*.py')) errors = list(pathlib.Path('examples', 'errors').glob('*.py')) unused = [] for path in pathlib.Path('examples', 'data').glob('*'): @@ -241,6 +241,10 @@ def main() -> None: if args.k and args.k not in path.name: continue futures[path] = executor.submit(run_integration_test, path, executable=executable) + for path in pathlib.Path('examples', 'wip', 'tle').glob('*.py'): + if args.k and args.k not in path.name: + continue + futures[path] = executor.submit(run_integration_test, path, executable=executable) for path in pathlib.Path('examples', 'errors').glob('*.py'): if args.k and args.k not in path.name: continue diff --git a/scripts/make_gallery.py b/scripts/make_gallery.py index 81045020..da8772c6 100644 --- a/scripts/make_gallery.py +++ b/scripts/make_gallery.py @@ -45,14 +45,14 @@ def main() -> None: executable = get_local_install_root() / 'bin' / 'jikka' futures: Dict[Tuple[pathlib.Path, str], concurrent.futures.Future] = {} with concurrent.futures.ThreadPoolExecutor(max_workers=args.jobs) as executor: - for path in pathlib.Path('examples').glob('*.py'): + for path in list(pathlib.Path('examples').glob('*.py')) + list(pathlib.Path('examples', 'wip', 'tle').glob('*.py')): for target in ('rpython', 'core', 'cxx'): futures[(path, target)] = executor.submit(transpile_python_script, path, target=target, executable=executable) for path in pathlib.Path('examples', 'errors').glob('*.py'): futures[(path, 'error')] = executor.submit(read_transpilation_error, path, executable=executable) examples = [] - for path in sorted(pathlib.Path('examples').glob('*.py')): + for path in sorted(pathlib.Path('examples').glob('*.py')) + sorted(pathlib.Path('examples', 'wip', 'tle').glob('*.py')): with open(path) as fh: code = fh.read() examples.append({