March 06th, 2018 Week 10th Tuesday】的更多相关文章

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…
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.…
Easy come, easy go. 易得则易失. Easy come, easy go, I finally undestand the phrase through somewhat hard way. Things were going so well for a moment, I was so confident that it would last forever, but it seemed my fate had quite the opposite in mind. Ever…
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…
Fortune favors the bold. 勇者天佑. It has been increasingly apparent that courage is the main quality we need to start our own business, it can't make one rich being an ordinary employee. Every day, every moment, millions of people dream of starting a bu…
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倍数…
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.…
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…