随笔分类 - 贪心
摘要:#include#include#include#include#include#include //friend bool operator b.coun; } priority_queue Q;using namespace std;struct node{ int num; ...
阅读全文
摘要:题意:思路:#include#include#include#include#include#include#include#include#includeusing namespace std;struct Work{ __int64 c,d;};Work work[100000+10];i...
阅读全文
摘要:题意:http://bestcoder.hdu.edu.cn/contests/contest_chineseproblem.php?cid=578&pid=1001思路:讲述列从大到小排列 先把数量多的数字剪掉 最后遍历求和#include#include#include#includeusing...
阅读全文
摘要:#include#include#include#include#include#includeusing namespace std;#define MAXN 100000+10int n,st[MAXN],cnt,a[MAXN],kill[MAXN]={0},f[MAXN]={0};int ma...
阅读全文
摘要:题意:思路:#include#include#include#include#include#include#include#include#include#define LL __int64using namespace std;const int MAXN=1000+5;const int IN...
阅读全文
摘要:#include#include#include#include#include#include#includeusing namespace std;int a[1000000+10];char str[1000000+10];int main(){ int n; int i,j,k;...
阅读全文
摘要:#include#include#include#include#include#include#include#include#include#define LL __int64using namespace std;const double EPS=1e-9;const int MAXN=100...
阅读全文
摘要:http://acm.csu.edu.cn/OnlineJudge/showsource.php?id=97234#include#include#include#include#includeusing namespace std;int main(){ //freopen("output.tx...
阅读全文
摘要:http://codeforces.com/contest/507/problem/A#include#include#include#includeusing namespace std;struct Num{ int v; int id;};Num num[100+10];int c...
阅读全文
摘要:http://acm.zju.edu.cn/onlinejudge/showProblem.do?problemCode=3519题意 :caocao能够战胜每一个人 战胜智商比他高的加2点智商 否则加1点 问经过辩论后能得到的最高智商值为多少思路:在辩论中一直和智商比自己高的比 把比自己低的...
阅读全文
摘要:DescriptionAssume the coasting is an infinite straight line.Land is in one side of coasting, sea in the other.Each small island is a point locating in...
阅读全文
摘要:Descriptiontwo hundred silver dollars from the loser.""Being the most powerful man in the country,the king has so nice horses that in each class his h...
阅读全文
摘要:http://acm.hdu.edu.cn/showproblem.php?pid=1789题意: 每个老师都会给出交作业的期限和没按时交会扣掉的分数 要求出扣除最少分数的情况思路:是一题典型的贪心把扣除分数多的科目排在前面并排在尽量晚的位置#include#include#include#incl...
阅读全文

浙公网安备 33010602011771号