Perfect Cubes Time Limit: 1000MS Memory Limit: 10000K Total Submissions: 14901 Accepted: 7804 Description For hundreds of years Fermat's Last Theorem, which stated simply that for n > 2 there exist no integers a, b, c > 1 such that a^n = b^n + c…
Perfect Cubes Time Limit: 1000MS Memory Limit: 10000K Total Submissions: 12595 Accepted: 6707 Description For hundreds of years Fermat's Last Theorem, which stated simply that for n > 2 there exist no integers a, b, c > 1 such that a^n = b^n + c…
Perfect Cubes Time Limit: 1000MS Memory Limit: 10000K Total Submissions: 15302 Accepted: 7936 Description For hundreds of years Fermat's Last Theorem, which stated simply that for n > 2 there exist no integers a, b, c > 1 such that a^n = b^n + c…
POJ 3398 Perfect Service(树型动态规划,最小支配集) Description A network is composed of N computers connected by N − 1 communication links such that any two computers can be communicated via a unique route. Two computers are said to be adjacent if there is a com…
Sticks Time Limit: 1000MS Memory Limit: 10000K Total Submissions: 127771 Accepted: 29926 Description George took sticks of the same length and cut them randomly until all parts became at most 50 units long. Now he wants to return sticks to the or…
http://poj.org/problem?id=1011 题意:若干个相同长度的棍子被剪成若干长度的小棍,求每根棍子原来的可能最小长度. 思路:很经典的搜索题. 我一开始各种超时,这题需要很多剪枝. #include<iostream> #include<string> #include<cstring> #include<algorithm> using namespace std; int n; ]; ]; bool cmp(int a, int b…
题目链接:http://poj.org/problem?id=1011 Sticks Time Limit: 1000MS Memory Limit: 10000K Total Submissions: 154895 Accepted: 37034 Description George took sticks of the same length and cut them randomly until all parts became at most 50 units long. Now…
题目: http://poj.org/problem?id=3714 http://acm.hust.edu.cn/vjudge/contest/view.action?cid=27048#problem/D Raid Time Limit: 5000MS Memory Limit: 65536K Total Submissions: 7355 Accepted: 2185 Description After successive failures in the battles aga…