VK-Cup2017 Wild Card Round 2】的更多相关文章

来自FallDream的博客,未经允许,请勿转载,谢谢. Cf的Vkcup外卡赛2  上次round2和ditoly翻车了 所以只好来打打了  规则是给一道比较特殊的题目,你要找出较优的解 University Schedule/大学课程 有n个学生,m个教授,一周有6天,每天有7节课 告诉你每个学生这一周要和每个教授上多少节课 但是只有a个教室  也就是同一时间最多只能有a节课 定义学生和教授的疲劳度  假设一个学生/教授在一天上的第一节课是第x节,最后一节是第y节 那么它的疲劳度是(y-x+…
A题 简单模拟. /************************************************************************* > File Name: A.cpp > Author: Stomach_ache > Mail: sudaweitong@gmail.com > Created Time: 2014年09月01日 星期一 08时08分12秒 > Propose: *******************************…
题目地址:http://blog.csdn.net/shiyuankongbu/article/details/10004443 /* 题意:在i前面找回文子串,在i后面找回文子串相互配对,问有几对 DP:很巧妙的从i出发向两头扩展判断是否相同来找回文串 dpr[i] 代表记录从0到i间的回文子串的个数,dpl[i] 代表记录i之后的回文子串个数 两两相乘就行了 详细解释:http://blog.csdn.net/shiyuankongbu/article/details/10004443 */…
来自FallDream的博客.未经允许,请勿转载,谢谢. ---------------------------------------------------- 和ditoly组队打vkcup,原来以为是正常div2难度,结果发现.....不说了 AB都被叉了一遍,又掉分 ....... ------------------------- A.给定n个人和m组朋友关系,判断这个图是否满足性质:如果x和y是朋友,y和z是朋友,那么x和z是朋友 n,m<=150000 题解:很容易发现满足关系的图…
VK news recommendation system daily selects interesting publications of one of n disjoint categories for each user. Each publication belongs to exactly one category. For each category i batch algorithm selects ai publications. The latest A/B test sug…
C. Cd and pwd commands Time Limit: 20 Sec Memory Limit: 256 MB 题目连接 http://codeforces.com/problemset/problem/158/C Description Vasya is writing an operating system shell, and it should have commands for working with directories. To begin with, he dec…
C. String Manipulation 1.0 Time Limit: 20 Sec Memory Limit: 256 MB 题目连接 codeforces.com/problemset/problem/91/B Description One popular website developed an unusual username editing procedure. One can change the username only by deleting some characte…
Cd and pwd commands time limit per test 3 seconds memory limit per test 256 megabytes input standard input output standard output Vasya is writing an operating system shell, and it should have commands for working with directories. To begin with, he…
D. k-Interesting Pairs Of Integers time limit per test 2 seconds memory limit per test 256 megabytes input standard input output standard output Vasya has the sequence consisting of n integers. Vasya consider the pair of integers x and y k-interestin…
今天在codeforces上面做到一道题:http://codeforces.com/contest/638/problem/B 题目大意是:给定n个字符串,找到最短的字符串S使得n个字符串都是这个字符串S的子串. 题目里有一个限制条件是每个字母都最多出现一次,所以可以用下面的方法来解决: http://codeforces.com/contest/638/submission/16900955 然后我想到如果问题没有“每个字母最多只出现一次”这个限制的话应该怎么解决. 暂时还在想………