goo blog サービス終了のお知らせ 

ねおぺぶろぐ

プライバシーポリシーはdocomo社のものに準拠します

メモ 競技プログラミングの鉄則 演習問題集 B08-B09 二次元累積和

2023年02月19日 | Pythonチャレンジ
B08 - Counting Pointshttps://atcoder.jp/contests/tessoku-book/tasks/tessoku_book_cg二次元累積和 A08と同じ問題n=int(input()) 制限値いっぱいまで領域を取って0クリア f=[[0]*(1501)for i in range(1501)] 取得した座標に1(赤いところ)をプロットする f . . . 本文を読む

メモ 競技プログラミングの鉄則 演習問題集 B1-B7

2023年02月18日 | Pythonチャレンジ
B03 - Supermarket 1 https://atcoder.jp/contests/tessoku-book/tasks/tessoku_book_cbN = int(input()) A = list(map(int, input().split())) ans = "No" for i in range(N-2): for j in range( . . . 本文を読む

メモ 競技プログラミングの鉄則 演習問題集A01-A08

2023年02月18日 | Pythonチャレンジ
2進数変換は10ケタ制限がなかったら解けなかったなぁ序盤の5問ですら結構難しいA06 - How Many Guests? --------------------------------------https://atcoder.jp/contests/tessoku-book/tasks/math_and_algorithm_ain,q=map(int,input().split()) a= . . . 本文を読む

メモ AtCoder Beginner Contest 285 A-E

2023年02月16日 | Pythonチャレンジ
https://atcoder.jp/contests/abc285/tasks/abc285_aこれ解らなくてカンニングしました二分木a,b=map(int,input().split()) if a*2==b or (a*2)+1==b: print("Yes") else: print("No")https://atcode . . . 本文を読む

メモ 再帰呼び出し

2023年02月13日 | Pythonチャレンジ
6文字の文字列でカッコが正常に閉じているパターンだけを列挙するよく見るとこれしかやってないdef 関数名:  ループの継続条件:   再帰呼び出し↓NG集((((((( (((((() ((((()( ((((()) (((()(( (((()() (((())( (((())) ((()((( ((()(() ((()()( ((()()) ((()) . . . 本文を読む