January 16th, 2018 Week 03rd Tuesday】的更多相关文章

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.…
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…
To strive, to seek, to find, and not to yield. 去奋斗,去寻觅,去探索,但绝不屈服. Strive for our dreams, seek the very answers of life which can help us out with doubts about life, and find out the very meaning of our existence. There are always many disappointing m…
Don't let go too soon, but don't hold on too long. 不要太快放手,也别紧握太久. It is inevitalbe to encounter with some insurmountable obstacles sometimes, especially when doing some unprecedented researches in those edge-cutting fields. If there is still no feasi…
We got things to do. Places to go. People to see. Futures to make. 我们有很多事情要做,有很多地方要去,有很多人要见,有很多美好的未来要创造. Since I joined this research team on September 6th, 2017, I have purchased many technical books to replenish my bookshelf, and the total number i…
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…
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…
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…
题意:给你一个大整数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…
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…
The worst solitude is to be destitute of sincere friendship. 最大的孤独莫过于没有真诚的友谊. Sometimes we pay the most for the things we get nothing, and that moment, may be the most frustrated. And the worst solitude thing, may be destitute of the one who really k…
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…
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…
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…
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…
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.…
Real love is not just instinct, but intent. 真正的爱不是身体上的一见钟情,而是要用心去经营. What is real love? Honestly, I have no idea, and I think most of the love relationship may be conditional, there is seldom unconditional love or real love. Even the strongest love m…
Losing all hope was freedom. 彻底绝望就是真正的自由. Losing all the hopes, and we are free to challenge everything. It would be better to stop dreaming unrealistic dreams and focus on things we are doing now. Sometimes, we must know some of our dreams or goals…
I wish you all I ever wanted for you, I wish you the best. 我希望你不负我的期望,愿你一切安好. I hope I can live up to all my own expectations about my life. I hope I can deserve all the confidence and expectations from others. I hope I can no longer disappoint those…
How long is forever? Sometimes, just one second. 永远有多久?有时候只是一秒. Just one second can make your life totally different. If you value every minute and every second, you can make them become everlasting. Time is always passing, and we are changing also.…