May 30. 2018 Week 22nd Wednesday】的更多相关文章

Never forget to say "Thanks." 永远不要忘记说谢谢. Don't take anything we get for granted, and never forget to say "Thanks" for people who help us, who serve us... But sometimes it would be quite hard to show our gratitudes when we genuinely and…
ACM International Collegiate Programming Contest, Tishreen Collegiate Programming Contest (2018) Syria, Lattakia, Tishreen University, April, 30, 2018 Problem A. Can Shahhoud Solve it? Problem B. Defeat the Monsters Problem C. UCL Game Night Problem…
You should love and take care of yourself because after all, it is your own life. 要学会爱自己,照顾自己,毕竟生活是你自己的. From "The Notebook". It is your own life, you must give it some meaningful things so that it could be as unique as your fingerprints. But ho…
And if you really want to see what people are, all you have to do is to look. 想真正了解他人,只需要用心看. From Wonder. At least once in our life someone would do something that make us say: Why did they do that? How could they do that? Why did they make such stu…
To be great, truly great, you have to be the kind of person who makes the others around you great. 要做到真正的伟大,你必须能够让周围的人变得伟大. From Mark Twain. We all want to be liked, loved and happy, some people make us feel valued, some people make us feel special,…
Be brave. Take risks. Nothing can substitute experience. 要敢于冒险,你的经历是无可替代的. From Paulo Coelho. Each step may be a challenge. Each day can become a joy. No one can destroy an unstoppable spirit. The worst and the best is yet to come. To create awarenes…
Life is too short to miss out anything; try to take it slowly. 生命短暂,放慢脚步,别错过任何沿途的风景. From Ferris Bueller's Day Off. Just because life is too short, just because I don't intend to miss anything, I have to increase my pace, otherwise I would be left fu…
You are confined only by the walls you build yourself. 限制你的只有你自己筑起的墙. From Andrew Murphy. Let's repeat this again and again: We are confined only by the walls we build ourselves. There are so many people, like me, always believe they ae trapped in si…
Try not to become a man of success but rather try to become a man of value. 不要为成功而努力,要为做一个有价值的人而努力. Success is external, value is internal. Success and value are related, but value may be more important, because a man of value must be a man of succes…
What makes life dreary is the want of motive. 没有了目的,生活便暗淡无光. We all have dreams about our future, we all have expectations of what we are doing. Sometimes, those dreams, those expectations might be the only things that give us the strength and believ…
The good seaman is known in bad weather. 惊涛骇浪,方显英雄本色. As we all know, the true worth of a person is only really apparent when difficult times stretch the  to the limit. Hard times bring forth heroes and heroes end hard times. So, if you think yoursel…
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…
Do one thing at a time, and do well. 一次只做一件事,并且要做到最好. Why is it that about 25% to 50% of people have ever reported that they felt overwhelmed or burned out at work? According to my own experience, it is not just the number of hours we are working, bu…
All things come to those who wait. 苍天不负有心人. It is said that those who are patient can see what their patience will reward, so why not hold on for a bit longer before choosing to quit? I always keep that in my mind but I don't know how long I can go i…
Better later than never. 亡羊补牢,时犹未晚. Time and again all of us are told to complete the tasks assigned to us on time and being lazy most of us would fail to do any assigned work on time, because the only result of procrsatination is that we may complet…
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…
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…
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,…
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…
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…
Each day has enough trouble of its own. 一天的难处一天当. Looking into the sunset I can't help but notice that despite its beauty, a sense of struggle and hopeless surround the sky. Deep inside I realize that this day is gone, and everything that it had brou…
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…
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…
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…
题意:给你一个大整数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 great discovery was ever made without a bold guess. 没有大胆的猜测就没有伟大的发现. When our ancestors saw the birds flying in the sky, they wondered that can people fly in the sky like birds. Then some of them started to try. After hundreds of thousands of time…