February 2nd, 2018 Week 5th Friday】的更多相关文章

Reputation takes a life time to build and a second to destroy. 树立名声需要一生的努力,而毁掉它只需要一秒. To be a smart man, I must know to do something good even though it may be small, and not do something wicked even though it may be tiny, because if I want to build…
Life takes on the meaning that you give it. 你赋予生活什么,生活就是什么样子. I always wonder why on earth I am here and why on earth I am living the current life. I always wonder what is the purpose of my life, whether I can be a man that is somewhat useful to othe…
The world is a fine place, and worth fighting for. 这世界是个好地方,值得为之奋斗. The world is beautiful, there are so many wonderful things we should defend against any wrongdoing that would undermine them. And there are so many people we love and we are willing…
Full of luck, health and cheer. We wish you a Happy Chinese New Year! 春节快乐,万事如意! From Shanbay. Today is the Chinese New Year of 2018. Wish every of us a Happy New Year. We will open a new book today, we will forget all our worries today. A new year a…
比赛链接:https://www.codechef.com/FEB18,题面和提交记录是公开的,这里就不再贴了 Chef And His Characters 模拟题 Chef And The Patents 模拟题 Permutation and Palindrome 模拟题 Car-pal Tunnel 结论比较简单 Broken Clock 求余弦的n倍角,可以用复数的快速幂解决 $cos(a)=x \\ sin(a)=\sqrt{1-x^2} \\ cos(na) = Re((x+\sq…
Knowledge makes humble, ignorance makes proud. 博学使人谦逊,无知使人骄傲. Humility is not equal with being passive, submissive or insecure, instead, humility means being confident and being competent. Humble people always seek to self-actualize by helping themse…
Great minds think alike. 英雄所见略同. If great minds really did think alike, then we would live in an unreal world which is just a Dstopia. Given that our world is so varied, so I think the great minds don't think alike, though there might be only one tru…
A good beginning is half done. 良好的开端是成功的一半. We can't finish anything if we don't start, sometimes getting started might be the hardest part of the whole process. Get a good start on a project and the rest of it may fall into their own places naturall…
LIfe is about making an impact, not making an income. 生命在于影响他人,而非赚钱糊口. From Kevin Kruse. You probably argue that one must make an income first, then if he has some extra power while earning a not bad life, he can try to pursue some impacts on the wor…
Those are my principles, and if you don't like them... well, I have others. 那是我的原则,要是你不喜欢......那我还有其他原则. From Groucho Marx. Please hold on to your principles, if you think they are right. But sometimes, you can be more flexible so that you can stick…
It takes a strong man to save himself, and a great man to save another. 强者自救,圣者渡人. When you are not strong enough to save others, just concentrate on self-improvements and self-promotion. For many of us, the best thing we can do to save others is to…
Confine yourself to the present. 着眼当下. The morning wind spreads its fresh smell, we should get up and take that in, that wind lets us live, breathe, before it's gone. Sometimes we got stuck in the past, and sometimes we only live for the future, but…
Our life is what our thoughts make it. 我们的思想成就了我们的生活. The mind is everything. What you think, you become. And whatever you can do, or whatever you dream you can, begin it, because boldness has genius, power and magic in it. But sometimes, you don't a…
Receive without conceit, release without struggle. 接受时,不狂妄:放手时,不犹豫. How to understand this quote? Doesn't it mean that when we are given some gifts from others, we shouldn't take them for granted, we shouldn't ask for more, when we plan to let someth…
Love is blind, hard to find, difficult to get, and impossible to forget. 爱,很盲目,很难找,很难得,很难忘. It is almost impossible to find love, sincere love if we don't know ourselves, because we may not know who is our Mr. Right among those people me meet in our…
Don't cry for what is lost. Smile for what still remains. 别为失去的哭泣,为还留在你身边的一切微笑吧. I have been told that if crying for missing the sun, we may miss the chance to see the beautiful stars as well. Life would never give us the second time to get something…
The happiest part of a man's life is what he passes lying awake in bed in the morning. 人生一大乐事莫过去早上醒来可以赖赖床. From Samuel Johnson. Of course it is one of the happiest things, especially when you don't have to worry about your life. But if there are too…
Every orientation presupposes a disorientation. 迷失过方向,才能找到方向. Not until we are lost do we begin to understand ourselves. By Henry David Thoreau. Sometimes it seems everything about my future was ambiguously assumed. Graduated from college with ugly a…
Love does not dominate, it culitvates. 爱不是羁绊,而是成就. Love should not wipe out everything you are, love should not overpower you in a negative way and make you feel uncomfortable. Instead, it should bring out something good to you. Love requires action,…
You are your greatest asset. 你就是你自己最大的资本. For most of us, there are few things that we can count on but ourselves. If we lose confidence in our own life, in our own abilities, we may never win trusts from others. That means the intrinsic motivation m…
One man's fault is another man's lesson. 前车之覆,后车之鉴. We make mistakes every day, large or small, failures or faux pas. But failure and mistakes still don't feel like an awesome learing opportunity. I know it is my shortcomings that make me unique and…
Grasp all, lose all. 欲尽得,必尽失. Not to be greedy and not to try to get everything. Our time, energy and wisdom are all limited, if we want too much, we probably get nothing eventually, so why not hold our own in our real inclination, and place single-m…
It is not enough to have a good mind. The main thing is to use it well. 头脑聪明还不够,重要的是好好运用. From Rene Descartes. My colleagues have always brought me some surprises these days, and their talented skills and eloquence have made some indelible impression…
Every one of us want to ameliorate our own condition. You can only cure retail but you can prevent wholesale. 纠正只能弥补小错,预防却能杜绝大错. From Brock Chisholm. Self-discipline can help us prevent wholesale, and in the best case we wouldn't have to worry about…
When you fall in love, friends, let yourself fall. 当你坠入爱河,我的朋友,你就放手去爱吧. To love someone is like moving into a new house. At first we will fall in love in everything new, we wonder every morning that this is our own, as if they are afraid that someone…
We are all resigned to death: it is life we aren't resigned to. 我们可以屈从于死神,但我们却不能让生活任意摆布. Of all the wonderful gifts that we have been given, one of the greatest is freedom. As much as we may deny it, we are free in our life. That is, we are free in w…
To be is to be perceived. 存在即被感知. How to interpret this quote? Maybe it means that everything in your world doesn't exist if you failed to percept it. Moreover, eveything we think we know about the reality surrounding us may be not what it really is.…
Hope clouds observation. 心怀希望会蒙蔽双眼,影响判断. Almost every of us thinks we would be the master of our lives and live the life we are longing to live. I used to think in that way so. But that was the past. Because I have learned that I am just an ordinary…
题意:两地之间有n条不相交路径,第i条路径由a[i]座桥组成,每座桥有一个损坏概率,让你确定一个对所有桥的检测顺序,使得检测所需的总期望次数最小. 首先,显然检测的时候,是一条路径一条路径地检测,跳跃地检测没有意义.考虑已经排好的某个路径的顺序,相邻的两条路径j和j+1如果满足: (route[j].A+route[j].B)+(route[j+1].A+route[j+1].B)*(1.0-route[j].c)> (route[j].A+route[j].B)*(1.0-route[j+1]…
题意:平面上n个点,每个点带有一个或正或负的权值,让你在平面上放一个内边长为2l,外边长为2r的正方形框,问你最大能圈出来的权值和是多少? 容易推出,能框到每个点的 框中心 的范围也是一个以该点为中心的相同大小的框. 于是,把每个点的框拆成4条线.从下往上扫过去,最下面的线,给[R,R]区间加上该点的权值,然后上面再给[L,L]减去,然后上面再给[L,L]加上,然后再往上在给[R,R]减去即可.每次扫完一行,就用线段树的全局最大值尝试更新答案. 两个坑点:首先,由于线段树里存储的是离散后的点,所…