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/abc167/tasks/abc167_c | |
[解法] | |
N <= 12 と小さいことからbit全探索が想定解だったが、Pythonのitertoolsを使った組み合わせ生成でも充分早かった | |
[結果] | |
Python(3.8.2) AC 89ms | |
PyPy3(7.3.0) AC 79ms |
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/abc173/tasks/abc173_d | |
[解説] | |
https://youtu.be/IMwigbYzLbI?t=2853 | |
別例作って、ちゃんとモデル化して考えないとダメなんだろうなー | |
''' | |
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/abc169/tasks/abc169_c | |
''' | |
import sys | |
sys.setrecursionlimit(10 ** 6) # 再帰上限の引き上げ | |
input = sys.stdin.readline |
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/abc168/tasks/abc168_c | |
''' | |
import sys | |
import math | |
sys.setrecursionlimit(10 ** 6) # 再帰上限の引き上げ | |
input = sys.stdin.readline |
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_b | |
[解説] | |
https://atcoder.jp/contests/abc162/editorial/2275 | |
for分の繰り返し範囲指定の、うっかりミスに注意。 | |
N未満まで回すのか、N以下まで回すのか | |
''' |
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/abc174/tasks/abc174_c | |
[解法] | |
https://youtu.be/h0MGG8rxrYc?t=1654 | |
数列 7, 77, 777, 7777, ....は | |
漸化式 *10+7 で表現できる。 | |
これはmod(余り)をとった値でも同様。 |
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/abc171/tasks/abc171_c | |
問題の例に「0をどう変換するか?」書いてないところがポイントなのかなー? | |
そこから一歩進んだ考察するべき? | |
[参考] | |
https://blog.hamayanhamayan.com/entry/2020/06/23/193042 | |
基本はまやんさんのコードをPythonにコンバート | |
https://drken1215.hatenablog.com/entry/2020/06/21/225500 |
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/abc209/tasks/abc209_c | |
''' | |
import sys | |
sys.setrecursionlimit(10 ** 6) # 再帰上限の引き上げ | |
input = sys.stdin.readline |
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/abc190/tasks/abc190_d | |
[解説] | |
https://atcoder.jp/contests/abc190/editorial/643 | |
https://atcoder.jp/contests/abc190/submissions/19787117 | |
https://manabitimes.jp/math/1120 |
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/abc171/tasks/abc171_d | |
''' | |
import sys | |
sys.setrecursionlimit(10 ** 6) # 再帰上限の引き上げ | |
input = sys.stdin.readline |