動的計画法
DPが出来なさすぎてつらいので練習 AOJ0595(Schedule) コード // 8種類の選び方 N日のスケジュール int dp[8][1010]; const int mod = 1e4 + 7; int getid(char c) { if (c == 'J') return 0; if (c == 'O') return 1; return 2; } // 責任者が居ない場合を…
DPが出来なさすぎてつらいので練習 AOJ0595(Schedule) コード // 8種類の選び方 N日のスケジュール int dp[8][1010]; const int mod = 1e4 + 7; int getid(char c) { if (c == 'J') return 0; if (c == 'O') return 1; return 2; } // 責任者が居ない場合を…