题面: 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…
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…
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…
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 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=…