正文
增加 2 行删除 2 行
46 行未改动4748495051525354557 行未改动63646566676869707122 行未改动46 行未改动for (int i = 4; i < n; i++) {vector<vector<vector<vector<int> > > > new_dp(10, vector<vector<vector<int> > >(10, vector<vector<int> >(10, vector<int>(10, 0))));// 当前要添加的是第i+1位,根据奇偶性确定可选数字vector<int> possible_digits = ((i + 1) % 2 == 1) ? odd_digits : even_digits;for (int a = 0; a < 10; a++) {for (int b = 0; b < 10; b++) {for (int c = 0; c < 10; c++) {for (int d = 0; d < 10; d++) {7 行未改动}}}}dp = move(new_dp);}// 统计所有可能的结尾组合int ans = 0;22 行未改动46 行未改动4748495051525354557 行未改动63646566676869707122 行未改动46 行未改动for (int i = 4; i < n; i++) {vector<vector<vector<vector<int> > > > new_dp(10, vector<vector<vector<int> > >(10, vector<vector<int> >(10, vector<int>(10, 0))));// 当前要添加的是第i+1位,根据奇偶性确定可选数字vector<int> possible_digits = ((i + 1) % 2 == 1) ? odd_digits : even_digits;for (int a = 0; a < 10; a++) {for (int b = 0; b < 10; b++) {for (int c = 0; c < 10; c++) {for (int d = 0; d < 10; d++) {7 行未改动}}}}dp = move(new_dp);}// 统计所有可能的结尾组合int ans = 0;22 行未改动