#include<stdio.h> #include<stdlib.h> struct node { int a,b; }c[1002]; int cmpxy(const struct node *c,const struct node *d) { return (d->b - d->a) - (c->b - c->a); } int main() { int n,i,v,t,flag; // freopen("a.txt","…
Crixalis's Equipment Problem Description Crixalis - Sand King used to be a giant scorpion(蝎子) in the deserts of Kalimdor. Though he's a guardian of Lich King now, he keeps the living habit of a scorpion like living underground and digging holes. Some…
6326.Problem H. Monster Hunter 题意就是打怪兽,给定一棵 n 个点的树,除 1 外每个点有一只怪兽,打败它需要先消耗 ai点 HP,再恢复 bi点 HP.求从 1 号点出发按照最优策略打败所有怪兽一开始所需的最少 HP. 直接贴官方题解吧,这个题写的脑壳疼. 官方题解: 其实就是一直合并节点,最后合并到只有一个节点就是结果,具体的不想说什么了,这个题看了好久了,不想再看到他了... 代码是个人理解+个人习惯+综合多个题解写的.mdzz,我要撞墙... 代码: //1…
Crixalis's Equipment Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 2001    Accepted Submission(s): 805 [解题思路]这题只能说盛爷威武!盛爷给我们将贪心的时候将这题拿出来了,主要说说这题的思路,拿出两个装备,ai, bi, aj, bj, 假设两件装备都能放进去,那么先放置i后放置…
Crixalis's Equipment Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 2795    Accepted Submission(s): 1141 Problem Description Crixalis - Sand King used to be a giant scorpion(蝎子) in the deserts…
Problem H. Password Service 题目连接: http://www.codeforces.com/gym/100253 Description Startups are here, startups are there. Startups are everywhere! Polycarp would like to have his own startup, too. His business idea is a password service. Have you not…
Problem T: 结构体--学生信息排序 Time Limit: 1 Sec  Memory Limit: 128 MBSubmit: 2219  Solved: 1305[Submit][Status][Web Board] Description 定义存放一个学生信息的结构体类型,学生信息包括:姓名,学号,性别,院系,要求在随意输入5个学生的相关信息后,按照学号从小到大顺序输出这些学生的信息. Input 先输入5名学生的信息,按学号顺序排序输出后在输入要统计的院系名称 Output 先…
Home Web Board ProblemSet Standing Status Statistics   Problem H: 整型数组运算符重载 Problem H: 整型数组运算符重载 Time Limit: 1 Sec  Memory Limit: 128 MBSubmit: 643  Solved: 401[Submit][Status][Web Board] Description 定义Array类: 1.拥有数据成员int length和int *mems,分别是数组中元素的个数…
Problem H High bridge, low bridge Q: There are one high bridge and one low bridge across the river. The river has flooded twice, why the high bridge is flooded twice but the low bridge is flooded only once? A: Because the lower bridge is so low that…
Problem H. Hiking in the Hills 题目连接: http://codeforces.com/gym/100531/attachments Description Helen is hiking with her friends in a highland. Their plan is to hike from their camp A to a beautiful showplace B. Unfortunately, Helen started feeling diz…