题目链接:http://codeforces.com/contest/558/problem/E E. A Simple Task time limit per test5 seconds memory limit per test512 megabytes inputstandard input outputstandard output This task is very simple. Given a string S of length n and q queries each qu…
题目链接 and 题目大意 hdu3698 但是 hdu的数据比较弱,所以在这luogu提交吧UVA1490 Let the light guide us 有一个\(n*m\)的平原,要求每行选一个点,选\(n\)个点建造塔楼. 平原上每个点都有他自己的花费时间和魔法值. 为了正确控制塔楼,我们必须保证连续两排的每两座塔共用一个共同的魔法区域. 也就是要求每两行相邻的点都满足如下关系: 如果第\(i\)行选\(j\),第\(i+1\)行选\(k\),则需\(|j-k|≤f(i,j)+f(i+1,…
D. The Bakery time limit per test 2.5 seconds memory limit per test 256 megabytes input standard input output standard output Some time ago Slastyona the Sweetmaid decided to open her own bakery! She bought required ingredients and a wonder-oven whic…