April 30 2017 Week 18 Sunday】的更多相关文章

Our lives stretched out ahead of us, like a perpetual sunrise. 生命如永恒的日出,生生不息. Please respect yourself, respect your efforts, self-respect leads to self-displine. And self-displine can lead to great achievements. Don't believe in pessimism, if somethi…
题意:让你构造一个n个点的简单多边形,使得所有点是整点,并且所有边长是整数,并且没有边平行于坐标轴. 就利用勾股数,如下图这样构造即可,n为偶数时,只需矩形拼成,n为奇数时,封上虚线边即可. #include<cstdio> using namespace std; struct Point{ int x,y; Point(const int &x,const int &y){ this->x=x; this->y=y; } Point(){} }p[1005];…
题意:有n群人,每个人有喜欢的汉堡配方:有m家店,给出每家店的每个汉堡的配方,如果存在某个汉堡,其配料表包含某个人喜欢的配方,则这个人喜欢这个汉堡所在的店家.问你对每群人,输出被喜欢的人数最多的店面是哪家. 直接把每家店所能满足的口味表全塞到哈希表里面,暴力枚举统计即可. 这里用了双关键字哈希表,比较巧妙,是绝对的O(1). #include<cstdio> #include<cstring> #include<vector> using namespace std;…
题意:有n杯盐溶液,给定每杯里面盐的质量以及盐溶液的质量.问你有多少种方案选择一个子集,使得集合里面的盐溶液倒到一个被子里面以后,浓度为A/B. 折半枚举,暴力搜索分界线一侧的答案数,跨越分界线的答案,一侧用map存下来,枚举另一侧去统计. #include<cstdio> #include<map> using namespace std; typedef long long ll; ll ans; int n,a,b,m[39],t[39]; map<ll,int>…
You only live once, but if you do it right, once is enough. 人生只有一次,但如果活对了,一次也就够了. Maybe I am going to have to do a lot more work on the project before it is presentable. A lot of people can finish their work effortlessly, but it is so stiff for me to…
It is a characteristic of wisdom not to do desperate things. 不做孤注一掷的事情是智慧的表现. We are told that we had better not to put all our eggs into one basket, that means, we must learn how to spread the risks so as to reduce the potential risks to the minimum…
Happiness is a way station between too much and too little. 幸福就是刚刚好. I don't want to talk about it any more. Maybe I am the one who was cursed by the Heaven or by the God, because there was no happiness or luckiness in return for my positive and usef…
In the evening one may praise the day. 入夜方能赞美白昼. I think that could be understand in different ways, at least two. One is that we praise the day in the evening, because the day brings us the light, in the evening we know the value of light. The other…
Tomcat启动错误:九月 26, 2017 10:18:14 上午 com.sun.jersey.server.impl.application.RootResourceUriRules <init> 严重: The ResourceConfig instance does not contain any root resource classes. 我在我的web工程下的WEB-INF目录 web.xml中找到了这个不存在的或者说是缺省的jar包,在我删除了这个 <servlet&g…
FFmpeg Commits on May 30, 2017 https://github.com/FFmpeg/FFmpeg/commit/220b24c7c97dc033ceab1510549f66d0e7b52ef1 remove libschroedinger encoding and decoding wrappers The library has stopped being developed and Debian has removed it from its repositor…