March 11th, 2018 Week 11th Sunday】的更多相关文章

All good things must come to an end. 好景无常. Love is when the other person's happiness is more important than your own. 情是君喜胜于己欢. From H. Jackson Brown Junior. These days I am busy with an important project.…
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…
Tomorrow never comes. 我生待明日,万事成蹉跎. Most of my past failures can be chalked up to the bad habit of procrastination. If I had accomplished every task timely, my life would be totally different. Every task has its own deadline and happen in its unique w…
有点像计蒜之道里的 京东的物流路径 题目描述 给定一棵 N 个节点的树,每个节点有一个正整数权值.记节点 i 的权值为 Ai.考虑节点 u 和 v 之间的一条简单路径,记 dist(u, v) 为其长度,gcd(u, v) 为路径上所有节点(包含 u 和 v)的权值的最大公因子.min(u, v) 为路径上所有节点的权值的最小值.请求出所有节点对 (u, v) 中 dist(u, v) · gcd(u, v) · min(u, v) 的最大值 输入格式 输入的第一行包含一个整数 T,代表测试数据…
目录 题意 解析 AC_code @(Codechef March Cook-Off 2018. Maximum Tree Path) 题意 给你一颗\(n(1e5)\)个点有边权有点权的树,\(Min(u,v)\)表示\(u,v\)路径最小点权,\(gcd(u,v)\)表示\(u,v\)路径点权的最大公因数,\(dis(u,v)\)表示\(u,v\)路径大小. 输出\(max(dis(u,v)*gcd(u,v)*Min(u,v))\) 解析 法一: 外层枚举路径的gcd,并把两端点是gcd倍数…
Nothing happens unless first a dream. 一切始于梦想. When everything seems to be going against you, remember that the airplane takes off against the wind, not with it. 当一切似乎都不如意时,请记住,飞机也是逆风起飞的.…
It is during our darkest moments that we must focus to see the light. 越是在艰难的时候就越要着眼于光明. From Aristole Onassis. When we feel the darkness presses in our life, we should trust ourselves to find the light, because it is during the darkest moments that w…
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…
If a thing is worth doing it is worth doing well. 如果事情值得做,那就做好. If it is worth doing, then it is worth doing well, otherwise it is just a waste of time and energy. If you decide to do it, please try your best, otherwise the result may be not as satis…
I hope I can find the one who is afraid of losing me. 我希望找到一个担心失去我的人. When I was young, sometimes I threatened my parents that I would commit suicide if they kept on blaming me for my misdeeds. Now I grow up into an adult, I realize that I rally had…