题面: H. Mixing Milk Input file: standard input Output file: standard output Time limit: 1 second Memory limit: 256 megabytes   Farming is competitive business – particularly milk production. Farmer John figures that if he doesn't innovate in his milk pro…
题面: Problem F. Teleportation Input file: standard input Output file: standard output Time limit: 15 second Memory limit: 1024 megabytes   One of the farming chores Farmer John dislikes the most is hauling around lots of cow manure. In order to streamli…
题面: D. Lemonade Line Input file: standard input Output file: standard output Time limit: 1 second Memory limit: 256 megabytes   It's a hot summer day out on the farm, and Farmer John is serving lemonade to his N cows! All N cows (conveniently numbered…
题面: A. The Bucket List Input file: standard input Output file: standard output Time limit: 1 second Memory limit: 256 megabytes   Farmer John is considering a change in how he allocates buckets for milking his cows. He thinks this will ultimately allow…
题面: G. Back and Forth Input file: standard input Output file: standard output Time limit: 1 second Memory limit: 256 megabytes   Farmer John has two milking barns, each of which has a large milk tank as well as a storage closet containing 10 buckets of…
题面: E. Family Tree Input file: standard input Output file: standard output Time limit: 1 second Memory limit: 256 megabytes   Farmer John owns a family-run farm that has been passed down over several generations, with a herd of cows whose familial root…
题面: C. Team Tic Tac Toe Input file: standard input Output file: standard output Time limit: 1 second Memory limit: 256 megabytes   Farmer John owns 26 cows, which by happenstance all have names starting with different letters of the alphabet, so Farmer…
题面: 传送门 A. Out of Sorts Input file: standard input Output file: standard output Time limit: 1 second Memory limit: 256 megabytes   Keeping an eye on long term career possibilities beyond the farm, Bessie the cow has started learning algorithms from var…
题面: G. Snow Boots Input file: standard input Output file: standard output Time limit: 1 second Memory limit: 256 megabytes   It's winter on the farm, and that means snow! There are N tiles on the path from the farmhouse to the barn, conveniently number…
题面: C. Rest Stops Input file: standard input Output file: standard output Time limit: 1 second Memory limit: 256 megabytes   Farmer John and his personal trainer Bessie are hiking up Mount Vancowver. For their purposes (and yours), the mountain can be…
题面: 传送门 B. Hoofball Input file: standard input Output file: standard output Time limit: 5 second Memory limit: 512 megabytes   In preparation for the upcoming hoofball tournament, Farmer John is drilling his N cows (conveniently numbered 1 . . . N, whe…
题面: E. Convention Input file: standard input Output file: standard output Time limit: 1 second Memory limit: 256 megabytes   Cows from all over the world are arriving at the local airport to attend the convention and eat grass. Specifically, there are N…
题面: C. Mooyo Mooyo Input file: standard input Output file: standard output Time limit: 1 second Memory limit: 256 megabytes   With plenty of free time on their hands (or rather, hooves), the cows on Farmer John's farm often pass the time by playing vid…
题面: 传送门 B. Teamwork Input file: standard input Output file: standard output Time limit: 1 second Memory limit: 256 megabytes   For his favorite holiday, Farmer John wants to send presents to his friends. Since he isn't very good at wrapping presents, h…
题面: A. Taming the Herd Input file: standard input Output file: standard output Time limit: 1 second Memory limit: 256 megabytes   Early in the morning, Farmer John woke up to the sound of splintering wood. It was the cows, and they were breaking out of…
Problem H High bridge, low bridge Q: There are one high bridge and one low bridge across the river. The river has flooded twice, why the high bridge is flooded twice but the low bridge is flooded only once? A: Because the lower bridge is so low that…
http://acm.hunnu.edu.cn/online/problem_pdf/CERC2012/H.pdf HUNNU11377 题意:飞镖环有十个环,没个环从外到里对应一个得分1~10,每个环有一定的半径,给出n次丢飞镖的坐标,求出得分 思路:直接算出左边离原点的半径判断在哪个环里即可,然后求出半径,一开始将判断全部写成了函数,在循环里调用超时了,将所有判断移到循环内就AC了,坑! #include <stdio.h> #include <math.h> #include…
2019 Multi-University Training Contest 2: 1010 Just Skip The Problem 自闭记 题意 多测.每次给你一个数\(n\),你可以同时问无数次,每次问的是一个数\(y_i\),你会得到的回答是\(x\&y_i\)是否为\(y_i\),问你问的最少的次数的种数\(\%1e6+3\),可以调换顺序 10min 得出数学方法 求\(n!\%1e6+3\). 50min 自闭 5min 写出裸暴力,优化10min,交一发TLE 30min 网上…
Problem H. Password Service 题目连接: http://www.codeforces.com/gym/100253 Description Startups are here, startups are there. Startups are everywhere! Polycarp would like to have his own startup, too. His business idea is a password service. Have you not…
Problem H. Hometask 题目连接: http://codeforces.com/gym/100714 Description Kolya is still trying to pass a test on Numbers Theory. The lecturer is so desperate about Kolya's knowledge that she gives him the same task every time. The problem is to check i…
6326.Problem H. Monster Hunter 题意就是打怪兽,给定一棵 n 个点的树,除 1 外每个点有一只怪兽,打败它需要先消耗 ai点 HP,再恢复 bi点 HP.求从 1 号点出发按照最优策略打败所有怪兽一开始所需的最少 HP. 直接贴官方题解吧,这个题写的脑壳疼. 官方题解: 其实就是一直合并节点,最后合并到只有一个节点就是结果,具体的不想说什么了,这个题看了好久了,不想再看到他了... 代码是个人理解+个人习惯+综合多个题解写的.mdzz,我要撞墙... 代码: //1…
2019 Multi-University Training Contest 2 A. Another Chess Problem B. Beauty Of Unimodal Sequence 题意 给一个序列,求下标字典序最小和字典序最大的,先增后减的序列. 解体过程 比赛时首先不知道字典序最小LIS怎么求. 试图枚举分界点.[解体的开始] 公无渡河,公竟渡河? 活鱼在摸鱼,rdc在划水,sdcgvhgj在水深火热. 做法 考虑字典序最小的LIS怎么求? 这是个经典问题,预处理前缀LIS后缀L…
2019 Multi-University Training Contest 2 http://acm.hdu.edu.cn/contests/contest_show.php?cid=849 1005. Everything Is Generated In Equal Probability 考虑一个随机的排列的逆序对个数,显然对于两个数\(a,b\),他们位置是均匀排布的,也就是说有\(\frac{1}{2}\)的概率成为逆序对,并且是独立的. 所以一个长度为\(n\)的随机排列期望逆序对个…
题目:http://acm.hdu.edu.cn/showproblem.php?pid=6582 Path Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 262144/262144 K (Java/Others)Total Submission(s): 3747    Accepted Submission(s): 1075 Problem Description Years later, Jerry fell in love…
Welcome Party Time Limit: 4000/4000 MS (Java/Others)    Memory Limit: 524288/524288 K (Java/Others)Total Submission(s): 875    Accepted Submission(s): 194 Problem Description The annual welcome party of the Department of Computer Science and Technolo…
Problem H. Hard TestTime Limit: 20 Sec Memory Limit: 256 MB 题目连接 http://codeforces.com/gym/100342/attachments Description Andrew is having a hard time preparing his 239-th contest for Petrozavodsk. This time the solution to the problem is based on Di…
Contest - 河南省多校连萌(四) Problem H: 小姐姐的QQ号 Time Limit: 1 Sec  Memory Limit: 128 MBSubmit: 297  Solved: 20 SubmitWeb Board Description 一天GJJ去超市购物,一位发传单的小姐姐给了他一张名片:GJJ看到名片上有小姐姐的QQ号,特别激动心想能不能将它分解成两段子序列,完全一样又不互相重叠呢(长度为总长度一半)? Input 多实例,每次第一行给出一个T,表示T组数据,如果T…
2019 Multi-University Training Contest 7 A. A + B = C 题意 给出 \(a,b,c\) 解方程 \(a10^x+b10^y=c10^z\). trick hash! B.Bracket Sequences on Tree unsolved 做法 树hash,统计答案 然后疯狂wa,直到特判了最后两组数据... 假的AC F. Final Exam upsolved 题意 参加考试,确保通过 \(k\) 道题目. 复盘 先是认定了,所有题都复习相…
2019 Multi-University Training Contest 6 http://acm.hdu.edu.cn/contests/contest_show.php?cid=853 1002. Nonsense Time 这题比较神奇...有一个结论是:一个长度为\(n\)的随机排列的最长上升子序列期望长度为\(O(\sqrt n)\). 那么我们考虑倒着删数,每次暴力处理出当前任意一个最长上升子序列,然后删除\(x\)的时候判一下\(x\)在不在当前的序列中,在就重新求一遍,否则不…
2019 Multi-University Training Contest 5 http://acm.hdu.edu.cn/contests/contest_show.php?cid=852 1004. Equation 把所有绝对值的零点排个序,然后解方程就好了. #include<bits/stdc++.h> using namespace std; // #define int long long void read(int &x) { x=0;int f=1;char ch=…