This is チラ裏 itself.

しがない大学生

2012-11-24から1日間の記事一覧

印象に残った問題(TC編)

SRM553 Div2 Easy「PlatypusDuckAndBeaver」 全探索でも十分間に合うが、算数の問題として解ける。 その結果↓ class PlatypusDuckAndBeaver{ public: int minimumAnimals(int webbedFeet, int duckBills, int beaverTails){ return webbedFeet/2-beaverTails;…

印象に残った問題(CF編)

Codeforces 245H 「Queries for Number of Palindromes」 累積和で解くのがよいそうです。 自分は、dp[a][b]=string[a]からstring[b]の部分文字列内に含まれる回文数として、string[a]からstring[b]の部分文字列が回文: dp[a][b]=dp[a+1][b]+dp[a][b-1]-dp[a…