GCJ Crazy Rows
摘要:题目大意:给定一个由0和1组成的矩阵。只允许交换相邻的两行(第i行和第i+1行),要把矩阵化成下三角矩阵,最少需要交换几次?Small1#define MAX_N 45using namespace std;int n;char M[MAX_N][MAX_N];int a[MAX_N]; ...
阅读全文
HDU 4310 Hero
摘要:链接:http://acm.hdu.edu.cn/showproblem.php?pid=4310按比值排序:dps/hp...为了避免小数出现cmp函数写成相乘的形式#include #includeusing namespace std;class hero{public: int hp;...
阅读全文
BNUOJ 1013 YC大牛的判题任务
摘要:链接:http://www.bnuoj.com/bnuoj/problem_show.php?pid=1013水题..用结构体二级排序即可..#include #include using namespace std;typedef struct{ int num; int time;}pro;pr...
阅读全文
NYOJ 824 Greedy Mouse
摘要:描述A fat mouse prepared M pounds of cat food,ready to trade with the cats guarding the warehouse containing hisfavorite food:peanut. The warehouse has ...
阅读全文