January 02nd, 2018 Week 01st Tuesday】的更多相关文章

I dream my painting, and then I paint my dream. 我梦见我的画,然后我画我的梦. It was a long time after I had a good dream the last time. I dreamed I was the lucky one who won the lottery, a lot of money. I dreamed I was capable of dealing with everything well. Tha…
The things you own end up owning you. 你占有的东西终将会占有你. When we are longing for something, we would be willing to struggle very hard to get it. Once we attain it, we may fear that it would be gone sometimes, such fear would make us constantly bother abou…
Remembrance is a form of meeting, forgetfulness is a form of freedom. 记忆是一种相遇,遗忘是一种自由. Cherish those memory, whether they are sweet or bitter, we always learn something from the past. And sometimes if you don't intend to get lost in the past failures…
Accept who you are, and revel in it. 接受真实的自己并乐在其中. Try to accept youself and try to love yourself more than yesterday. If you are not confident in yourself and love yourself, you may fail to let others trust you and love you. Hope you never grow old.…
To remember is to disengage from the present. 铭记过去就是放弃当下. To remember the past doesn't mean we would disengage from the present. For most of us, the present is always the extension of the past, we can't easily make a clean break with our past. The pr…
In life the most interesting things tend to happen when you are on your way to do something else. 生活中最有趣的事情往往在你正要做别的事情的时候出现. Do you want to persuade me not to give up my current endeavors in learning oral-language and improving my writing skills? I r…
You can't make decisions based on fear and the possibility of what might happen. 不要因为恐惧未知的可能而妄下决定. Perhaps I should stop casting away my time on those things wiht little positive effects on my career development. I always pray to God to endue me with…
Just do what works for you, because there will always be someone who think differently. 就做你自己所能做的,因为天外有天,人外有人,总会有人想的不同. Just now, I saw a quote from Jean-Jacques Rousseau: People who know little are usually great talkers, while men who know much say…
My existence is not without reason. I know that I could be a quite a different person. 我的存在必定有意义,我知道我会成为一个与众不同的人. When you are considered to be indispensable in your organization, that means you have become quite a different person. Try to make yours…
Use the smile to change the world. Don't let the world change your smile. 用你的笑容去改变这个世界,别让这个世界改变了你的笑容. Always keep a smiling face toward the world, maybe it can return you a warm smile sometimes, especially in such cold days. But it is really cold the…
Embrace your life, for we only live once. 拥抱你的生活,因为我们只能活一次. We just live once, so I would rather live my life in an active and positive way than live in negative and pessimistic ways. And I would rather enjoy every moments of my life than complain an…
Anyone who has no spiritual aspirations is an idiot. 任何没有精神追求的人都是愚昧无知的人. Today I went to a bookshop with my girlfirend. I was surprised that there were so many people, not only students, but also many adults, who enjoyed reading there. Maybe we all h…
Nothing behind me, everything ahead of me, as is ever so on the road. 我的身后空空荡荡,整个世界都在前方,这就是在路上. That is the very feeling I feel now, and I know that is the life for the pioneers. There is no precedent, at least in my team, for what I am doing now, so…
Live, travel, adventure, bless, and don't be sorry. 精彩地活着,不停地前行,大胆冒险,心怀感激,不留遗憾. Everything we do is a kind of achievement. The question is, where are those achievements taking us? Are these constant achievements bringing us closer to the life we ulit…
No need to have a reason to love you. Anything can be a reason not to love you. 喜欢你,不需要什么理由:不喜欢你,什么都可以成为理由. I love you because I feel very comfortable when staying with you. I love you because you always consider me as one of the most important perso…
To be yourself in a world that is constantly trying to make you something else is the greatest accomplishment. 在一个不断想改变你的世界里坚持做自己,就是最伟大的成就. From Ralph Waldo Emerson. Sometimes it may be good to be a man who can hold on his bottom-line and can withsta…
Life's like a movie, write your own. Keep believing, keep pretending. 人生如同电影,书写自己的结局.持续相信,继续演出. Sometimes a movie with a dreary opening may turn out to be quite creditable in its middle part and have a happy ending which will be very memorable. Thoug…
题意:给你一个大整数X的素因子分解形式,每个因子不超过m.问你能否找到两个数n,k,k<=n<=m,使得C(n,k)=X. 不妨取对数,把乘法转换成加法.枚举n,然后去找最大的k(<=n/2),使得ln(C(n,k))<=ln(X),然后用哈希去验证是否恰好等于ln(X). 由于n和k有单调性,所以枚举其实是O(m). 妈的这个哈希思想贼巧妙啊,因为对数使得精度爆炸,所以不妨同步弄个哈希值,来判相等. opencup的标程: #include <stdio.h> #in…
题意:给你n个点,点带权,任意两点之间的边权是它们的点权的异或值中“1”的个数,问你该图的最小生成树. 看似是个完全图,实际上有很多边是废的.类似……卡诺图的思想?从读入的点出发BFS,每次只到改变它的任意一位所能到达的点(不论是否读入). 记录每个点是从哪个读入点BFS过来的,当第二次访问某个点的时候,就将它的两个源头(一次是第一次的时候标记的,一次是第二次过来的)连一条边. 这样最多连m(位数)*n条边,实际上比这个值更小. 这种做法可以将很多显然不会出现在最小生成树里的边排除掉. open…
题意:给你n个两两不同的零一串,Alice在其中选定一个,Bob去猜,每次询问某一位是0 or 1.问你最坏情况下最少要猜几次. f(22...2)表示当前状态的最小步数,2表示这位没确定,1表示确定为1,0表示确定为0. 首先枚举去问哪一位,从这些方案中取最小者. 这里的MAX(a,b)进行重定义,如果a,b中存在-1,则为真的max(a,b),否则为max(a,b)+1. f(222)=min(MAX(f(022),f(122)),MAX(f(202),f(212)),MAX(f(220),…
题意:有n个数,除了空集外,它们会形成2^n-1个子集,给你这些子集的和的结果,让你还原原来的n个数. 假设原数是3 5 16, 那么它们形成3 5 8 16 19 21 24, 那么第一轮取出开头的数(3),然后从当前最大的数(24)中减去它,然后必然会产生一个与其相等的数(21),将其一并删去(这个过程利用单调性,使用两个指针进行单调的从右向左的移动即可),然后将21进入下一轮的末尾……如此,3就是答案里的数. 下一轮变成 5 16 21……如此重复,每次序列长度减半,得到最终答案. 队友的…
题意:给你一些数,问你是否能够将它们划分成两个集合,使得这两个集合的异或和之差的绝对值最小. 设所有数的异或和为S,集合A的异或和为A. 首先,S的0的位对答案不造成影响. S的最高位1,所对应的A的那一位一定可以为1,不妨设它为1. 然后考虑后面的S的1位,尽量使A对应的位置为0,这样才能使S xor A,即B的值最大化,最接近A. 用线性基来进行判定,看能否将最高位到目前这位(假定目前这位是0)的这个区间用给定的数线性表出,如果能,就将这位设成0,否则,就将这位设成1. 妈的,其实整个过程只…
No affection but interests can be found in the world of animals. 在动物的世界里,只有利益,没有感情. From Animal World ( A movie in 2018) My brother, you must get up every morning with determination if you are going to go to bed with satisfication. Worring does not e…
I don't know anything with certainty, but seeing the stars makes me dream. 我不知道世间有什么事是确定不变的,但只要一看到星空,我就会开始做梦. From Loving Vincent. By comparison with uncertainty, I like certainty better, but I know life is always changing, the world is always changi…
Bad times make a good man. 艰难困苦出能人. Bad times make a good man, and hard times create strong men, but sometimes strong men did not bring good times. There is an argument that hard times require a strong man, that humans need leaders of confidence and…
True love is visible not to the eyes but to the heart. 真爱不靠眼睛看,要用心感受. True love is visible not to the eyes but to the heart, for eyes would be deceived. True knowledge is acuired not by reading books or learning from others, it is acquired only by pr…
Just be yourself because you are unique and you will shine. 每个人都是独一无二的,做好你自己,你也能够光芒四射. From What a Gril Wants. Why are we trying so hard to fit in when we were born to stand out? We just want to be perfect, we just want to get enough affirmation from…
Learn to let go and be clear of where you really want to head for. 学会放手,同时也要弄清楚自己的真正所爱. From Kissing a Fool. As an average man, and no longer young, I should focus my life in several goals that are the most likely to achieve, I am not a genius of all…
Nothing is more terrible than ignorance in action. 最可怕的事情莫过于无知而行动. In today's digital age, we can run very fast if we have enough information about what we are doing and have deep understanding about the potential problems. However, if not, then our…
Hope for the best, but prepare for the worst. 抱最好的愿望,做最坏的打算. To hope for the best and prepare for the worst was first said by John Jay in 1813. Back then, that saying made sense because life was tough, conditions were tough and people had little cont…