C. Journey time limit per test3 seconds memory limit per test256 megabytes inputstandard input outputstandard output Recently Irina arrived to one of the most famous cities of Berland — the Berlatov city. There are n showplaces to n, and some of them…
Greenhouse Effect time limit per test 2 seconds memory limit per test 256 megabytes input standard input output standard output Emuskald is an avid horticulturist and owns the world's longest greenhouse — it is effectively infinite in length. Over th…
Cut Ribbon time limit per test 1 second memory limit per test 256 megabytes input standard input output standard output Polycarpus has a ribbon, its length is n. He wants to cut the ribbon in a way that fulfils the following two conditions: After the…
C. Boredom time limit per test 1 second memory limit per test 256 megabytes input standard input output standard output Alex doesn't like boredom. That's why whenever he gets bored, he comes up with games. One long winter evening he came up with a ga…
[BZOJ4868][六省联考2017]期末考试(贪心) 题面 BZOJ 洛谷 题解 显然最终的答案之和最后一个公布成绩的课程相关. 枚举最后一天的日期,那么维护一下前面有多少天可以向后移,后面总共需要往前移多少天,扫一遍贪心就好了. #include<iostream> #include<cstdio> using namespace std; #define ll long long #define MAX 100100 inline int read() { int x=0;…
[BZOJ5250][九省联考2018]秘密袭击(动态规划) 题面 BZOJ 洛谷 给定一棵树,求其所有联通块的权值第\(k\)大的和. 题解 整个\(O(nk(n-k))\)的暴力剪剪枝就给过了... #include<iostream> #include<cstdio> #include<cstring> using namespace std; #define MAX 1700 #define MOD 64123 inline int read() { int x…
这里说的不是用LaTeX画图,而是插入已经画好的图片..想看画图可以把滚动条拉到底.前情回顾[LaTeX]E喵的LaTeX新手入门教程(1)准备篇 [LaTeX]E喵的LaTeX新手入门教程(2)基础排版 [LaTeX]E喵的LaTeX新手入门教程(3)数学公式图片的插入A picture says more than a thousand words. — Shakespeare没图你说个××. ——莎士比亚LaTeX支持的图片格式由于在前面的教程中建议大家使用XeLaTeX,因此在图形格式的…
换了块硬盘折腾了好久..联想的驱动真坑爹.前情回顾[LaTeX]E喵的LaTeX新手入门教程(1)准备篇文档框架嗯昨天我们已经编写了一个最基本的文档,其内容是这样的:\documentclass{article}\begin{document}XXX is a SB.\end{document}这个文档呢其实是分为两部分的:一部分是\begin{document}之前的那部分也就是第一行,这一部分我们称之为导言区.导言区的内容可以不只一行,它的作用是完成文档的基础设定.比如在这个文档中,我们使用…