Description Since you are the best Wraith King, Nizhniy Magazin «Mir» at the centre of Vinnytsia is offering you a discount. You are given an array a of length n and an integer c. The value of some array b of length k is the sum of its elements excep…
ACdreamOJ 1154 Lowbit Sum (数位dp) ACM 题目地址:pid=1154" target="_blank" style="color:rgb(0,136,204); text-decoration:none">ACdreamOJ 1154 题意: long long ans = 0; for(int i = 1; i <= n; i ++) ans += lowbit(i) lowbit(i)的意思是将i转化成二进制…
pid=5647">[HDU 5647]DZY Loves Connecting(树DP) DZY Loves Connecting Time Limit: 4000/2000 MS (Java/Others) Memory Limit: 262144/262144 K (Java/Others) Total Submission(s): 332 Accepted Submission(s): 112 Problem Description DZY has an unroote…
Bomb HDU - 3555 (数位DP) The counter-terrorists found a time bomb in the dust. But this time the terrorists improve on the time bomb. The number sequence of the time bomb counts from 1 to N. If the current number sequence includes the sub-sequence "49&…
poj2342 Anniversary party (树形dp) Time Limit: 1000MS Memory Limit: 65536K Total Submissions: 9128 Accepted: 5250 Description There is going to be a party to celebrate the 80-th Anniversary of the Ural State University. The University has a hierarc…
题目链接:https://icpcarchive.ecs.baylor.edu/index.php?option=com_onlinejudge&Itemid=8&category=648&page=show_problem&problem=5155 There are N guests checking in at the front desk of the hotel. 2K (0 ≤ 2K ≤ N) of them are twins.There are M room…
题目链接 https://icpcarchive.ecs.baylor.edu/index.php?option=com_onlinejudge&Itemid=8&page=show_problem&problem=2988 problem Description Flatland government is building a new highway that will be used to transport weapons from its main weapon plan…
题目链接 http://acm.split.hdu.edu.cn/showproblem.php?pid=4283 Problem Description The TV shows such as You Are the One has been very popular. In order to meet the need of boys who are still single, TJUT hold the show itself. The show is hold in the Small…
http://acm.split.hdu.edu.cn/showproblem.php?pid=4035 Maze Special Judge Problem Description When wake up, lxhgww find himself in a huge maze. The maze consisted by N rooms and tunnels connecting these rooms. Each pair of rooms is connected by one a…
Domination Time Limit: 8 Seconds Memory Limit: 131072 KB Special Judge Edward is the headmaster of Marjar University. He is enthusiastic about chess and often plays chess with his friends. What's more, he bought a large decorative chessboar…