随笔分类 - 状态压缩(二进制)
摘要:Problem DescriptionYou'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 like this:The player distributes pebbles across
阅读全文
摘要:Problem DescriptionIgnatius has just come back school from the 30th ACM/ICPC. Now he has a lot of homework to do. Every teacher gives him a deadline of handing in the homework. If Ignatius hands in the homework after the deadline, the teacher will reduce his score of the final test, 1 day for 1 poin
阅读全文
摘要:Problem DescriptionSquares and rectangles fascinated the famous Dutch painter Piet Mondriaan. One night, after producing the drawings in his 'toilet series' (where he had to use his toilet paper to draw on, for all of his paper was filled with squares and rectangles), he dreamt of filling a
阅读全文
摘要:Problem DescriptionFarmer John has purchased a lush new rectangular pasture composed of M by N (1 ≤ M ≤ 12; 1 ≤ N ≤ 12) square parcels. He wants to grow some yummy corn for the cows on a number of squares. Regrettably, some of the squares are infertile and can't be planted. Canny FJ knows that t
阅读全文
摘要:Home PageWeb ContestsProblemsRanklistStatusStatistics 1 #include 2 #include 3 #include 4 #include 5 #include 6 #include 7 using namespace std; 8 int c[100]; 9 int s[100];10 int ans;11 int bitmap[100];12 int f[100][70][70],h;13 char str[100];14 int n,m,i,j,k;15 void init()16 {17 cin>>n>>m
阅读全文

浙公网安备 33010602011771号