This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
''' | |
[問題] | |
https://atcoder.jp/contests/abc214/tasks/abc214_c | |
[参考] | |
https://atcoder.jp/contests/abc214/editorial/2438 | |
円周上を2周させないと答えが出ないとのこと | |
''' | |
import sys |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
''' | |
[問題] | |
https://atcoder.jp/contests/abc217/tasks/abc217_e | |
[参考] | |
https://atcoder.jp/contests/abc217/editorial/2577 | |
公式解説のロジックをPythonにコンバート | |
PythonのQueueモジュールの使い方【初心者向け】 | |
https://techacademy.jp/magazine/18995 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import sys | |
import bisect | |
import array | |
input = sys.stdin.readline | |
L, Q = map(int, input().split()) | |
# arrayのほうが、listより追加処理が速いようだ。約1/3軽量 | |
A = array.array('I', [0, L]) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
''' | |
[問題] | |
https://atcoder.jp/contests/abc163/tasks/abc163_d | |
[解説] | |
https://youtu.be/HVuSp_IhNZA?t=5554 | |
なるほど感 | |
https://atcoder.jp/contests/abc163/submissions/24993818 | |
''' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
''' | |
[問題] | |
https://atcoder.jp/contests/dp/tasks/dp_l | |
[解説] | |
https://kyopro-friends.hatenablog.com/entry/2019/01/12/231000 | |
dp[i][j]=(区間[i,j]が残ってるときの「次の手番の人の得点-そうじゃない方の人の得点」) | |
とすればよさそうだね。実装はメモ化再帰が簡単かな。 | |
計算量はO(N^2) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
''' | |
[問題] | |
https://atcoder.jp/contests/abc213/tasks/abc213_d | |
[結果] | |
PyPy3(7.3.0) AC 1169ms | |
Python(3.8.2) AC 1151ms | |
''' | |
import sys |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
''' | |
[問題] | |
https://atcoder.jp/contests/abc162/tasks/abc162_d | |
[解法] | |
AtCoder Beginner Contest 143 [ D - Triangles ]をPythonで解く | |
https://uchidama.hatenablog.com/entry/2021/08/06/150713 | |
この問題に似てる。 | |
1 <= N <= 4000 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
''' | |
[問題] | |
https://atcoder.jp/contests/abc143/tasks/abc143_d | |
[解説] | |
https://youtu.be/3U_N7zelnMM?t=2984 | |
https://img.atcoder.jp/abc143/editorial.pdf | |
a, bを総当たり(2 * 10^3)^2 で 4 * 10^6 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
''' | |
[問題] | |
https://atcoder.jp/contests/abc143/tasks/abc143_d | |
[解説] | |
https://atcoder.jp/contests/abc143/editorial/652 | |
O(N^3)解法を、やってみる | |
numpy + njitを使わないと、計算速度間に合わない。 | |
これでTLE回避できるのかー。 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
''' | |
[問題] | |
https://atcoder.jp/contests/abc144/tasks/abc144_d | |
数学問題 | |
[解説] | |
https://blog.hamayanhamayan.com/entry/2019/10/27/233430 | |
https://img.atcoder.jp/abc144/editorial.pdf | |
''' |