首页 > TAG信息列表 > Pebbles

[Luogu] CF509B Painting Pebbles

前言 我好菜啊 传送门: https://www.luogu.com.cn/problem/CF509B 思路 要求任意两堆石头中相同颜色的石头的数量之差小于等于1 因此不难想,我们可以贪心地做 : 首先把所有石子都涂成相同的颜色 比如: ‘1’ 但是问题就来了: 其他颜色还没用到,这么贪心 大概率是错的 因此我

Pebbles HDU 2167

Pebbles HDU 2167 大意:给定一个N*N的方格,让你在里面取出一些数使其和最大,要求每一个数不能与其相邻的8个数同时取出. 思路:和炮兵阵地那一题有点像,但我们只需要考虑上一行的情况,这要简单很多,同时每一行的合法状态数量都是一样的,只需要每次读入预处理每一行每一种合法状态对应的和即

Pebbles 状态压缩&&dp 状态转移

Problem Description You're given an unlimited number of pebbles to distribute across an N x N game board (N drawn from [3, 15]), where each square on the board contains some positive point value between 10 and 99, inclusive. A 6 x 6 board might look