Every man is a poet when he is in love. 每个恋爱中的人都是诗人. It is said this saying was from Plato, the famous ancient philosopher. Notice that when you are dating with a girl, the romantic process may involve flowers, chocolate, sweet words and surprising g…
题意:给你一个序列,长度不超过52,每个元素不超过13.让你重新对这个序列排序,sum(i)表示i的前缀和,使得排序过后,对每个i,都有sum(i)%i==0. 深搜,加两个优化:①倒着从后向前搜:②枚举的时候不要枚举52个,而枚举值域(只有13),能快一点. 另外,一开始想的是相同的元素在最后一定都相邻,但是事实上试了试之后发现不行. #include<cstdio> #include<cstdlib> using namespace std; int path[60],a[60…
Much effort, much prosperity. 越努力,越幸运. I have ever seen this sentence in many people's signature of their social media applications, like WeChat, Tecent QQ, and so on. I ever thought that may be true, if you make much more efforts, you would be able…
There is more to life than increasing its speed. 生活不仅仅是匆匆赶路. Get a life, a real life, not a manic pursuit of the next promotion, the bigger paycheck, the larger house, and so on. Get a life in which you are not alone. Find people you love, and who lo…
The only thing more painful than learning from experience is not learning from experience. 比从经验中学习更为痛苦的事情就是没能从经验中学习. Learning from experience is painful, but the alternative of not learning is worse. Yes, it it easy to understand why not learning fro…
Had I not seen the sun, I could have borne the shade. 我本可以忍受黑暗,如果我不曾见过阳光. A poem by Emily Dickinson, and the full text follows: Had I not seen the sun I could have borne the shade But light a newer wilderness My wilderness had made Aha, if just readi…
We read the world wrong and say that it deceives us. 我们把世界看错了,反而说它欺骗了我们. It is not a cakewalk to see the world clearly and read it in the right way. Sometimes we didn't attain the things we expected, we might complain that the world deceived us. Why…
Have you ever known the theory of chocie? There are a bunch of axiems, but there are only two thing we really need to concern with. One, the only person's behaviors that we can control are our own. And two, the only thing that we can truly give other…
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…
Fear is an essential part of our survival, it keeps us alert. 恐惧是生存的重要部分,它让我们保持警惕. Fear and pain are both the essential part of our survival. If a child can't feel pain, then his or her life would be full of danger, as we know in many stories, one ca…
Attitude is a little thing that makes a big difference. 小态度,大不同. Attitudes can make a big difference, if combined properly with practice and ambition. I often complain that the God is unfair because I think I have not gain what I deserve. But if I re…
Life is the art of drawing without an eraser. 人生如画,落笔无悔. Yesterday I watched a film from Japan, After the Storm, which told a story about a middleaged man. He is a unsuccessful novelist and divorced his wife, because he was indulged in gambling. But…
If you are not brave enough, no one will back you up. 如果你不够勇敢,没人会替你坚强. I was told that the real man can smile in trouble, gather strength from distress, and grow brave by reflection. I learned that courage is not the absence of fear, but the triumph…
Courage is grace under pressure. 勇气就是压力下的优雅. In the face of stress, can you deal with your task smoothly? I can't, I can't keep calm, because I am vulnerable to pressures. I just become anxious if facing the pressures, but I seldom take measures to r…
Mountains look beautiful from a distance. 远处看山山更美. This gnomic seems to circulate very long, its more universal version is the distance can produce the beauty, alleged far see a flower, see posse hemp nearly. Yes, the distance produces beauty, while…
Happiness is a direction, not a place. 快乐是一个方向,不是一个目的. Do you remember those moments in your life when you were happy and joyful? Do you remeber how those moments came, and how they made you feel? If you have some clear answers, I think you will know…
It does not do to dwell on dreams and forget to live. 整天沉溺于梦想而忘记如何好好生活,毫无意义. Bingo, and I think it is useless, even harmful to spend time on these lack-of-rewarding things. Sometimes it would be far better to format the system and restore the whole e…
All I ever wanted was a single thing worth fighting for. 我想要的只不过是一件能让我奋不顾身的事业. Stop complaining the unfairness of fate. Promise yourself to dream more and hesitate less. To believe in yourself more and judge yourself less by the accomplishments of ot…
Only I can change my life. No one can do it for me. 只有我可以改变我的命运,没有人可以帮我做. Stop complaining about the unfairness of your fate. Except for some unexpected reasons, many of the results are determined by our own actions. So, if we want to make some chang…
I was well beaten myself, and I am beffer for it. 我自己也被打败过,但我因此变得更好. For most of us, the life road can't be as easy and smooth as we had expected, it is inevitable that we would experience failures, frustrations and losses. No doubt the effects of th…