题面: Alexandra has a paper strip with n numbers on it. Let's call them ai from left to right. Now Alexandra wants to split it into some pieces (possibly 1). For each piece of strip, it must satisfy: Each piece should contain at least l numbers. The di…
题目链接:http://poj.org/problem?id=2823 #include<iostream> #include<cstdio> #define M 1000001 using namespace std; int n,k; int a[M]; int q[M]; int p[M]; void get_min() { ; ; ;i<k-;i++) { while(head<=tail&&a[i]<=q[tail]) --tail; q…
F. Cutlet time limit per test 4 seconds memory limit per test 256 megabytes input standard input output standard output Arkady wants to have a dinner. He has just returned from a shop where he has bought a semifinished cutlet. He only needs to fry it…
题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=3706 Second My Problem First Time Limit: 12000/4000 MS (Java/Others) Memory Limit: 65536/65536 K (Java/Others) Problem Description Give you three integers n, A and B. Then we define Si = Ai mod B and…
B. Ancient Berland Hieroglyphs 题目连接: http://codeforces.com/problemset/problem/164/B Descriptionww.co Polycarpus enjoys studying Berland hieroglyphs. Once Polycarp got hold of two ancient Berland pictures, on each of which was drawn a circle of hierog…
B. Psychos in a Line Time Limit: 20 Sec Memory Limit: 256 MB 题目连接 http://codeforces.com/problemset/problem/319/B Description There are n psychos standing in a line. Each psycho is assigned a unique integer from 1 to n. At each step every psycho who h…