March 03rd, 2018 Week 9th Saturday】的更多相关文章

No cross, no crown. 不经历风雨,怎能见彩虹. Sometimes you can see a beautiful rainbow high in the sky without having to experience wind and rain, for you can stay in some safe and comfortable places And for some unfortunate ones, they only saw rains but no rain…
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.…
Make hay while the sun shines. 勿失良机. Last night the toothache woke me up and it was very difficult for me to get asleep again. I felt very depressed then, living a poor life, having no money to buy a house or just rent a big one for my lover who has…
Let bygones be bygones. 过去的就让它过去吧. What happened has happened, it cannot be undone, so just leave it in the way it si, and think of the way out or ways to make things better. To forgive and to forget, that can be very challenging in practice, but lea…
有点像计蒜之道里的 京东的物流路径 题目描述 给定一棵 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倍数…
Soon is not as good as now. 别谈未来,现在就行动. From Seth Godin. I always told myself that I should finish what I should do as soon as possible, but the ending might be always the same: The things were finished just before the deadlines with poor quality. An…
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…
Curiosity is the wick in the candle of learning. 如果学习是一根蜡烛,那好奇心就是烛芯. From William Arthur Ward. Please keep curiosity strong. We were all born with curiosity, but many of us might lose our curiosity all too soon. But curiosity is very important to our…
We are who we choose to be. 要成为怎样的人,选择在于自己. From Barry Manilow. I believe that we are who we choose to be. Nobody is going to come and save us, we have got to save ourselves. Nobody is going to give us anything, we have got to go out and fight for it…