Description Kochiya Sanae is a lazy girl who makes and sells bread. She is an expert at bread making and selling. She can sell the i-th customer a piece of bread for price pi. But she is so lazy that she will fall asleep if no customer comes to buy b…
Description   Your new company is building a robot that can hold small lightweight objects. The robot will have the intelligence to determine if an object is light enough to hold. It does this by taking pictures of the object from the 6 cardinal dire…
http://acm.zju.edu.cn/onlinejudge/showProblem.do?problemCode=3607 Lazier Salesgirl Time Limit: 2 Seconds      Memory Limit: 65536 KB Kochiya Sanae is a lazy girl who makes and sells bread. She is an expert at bread making and selling. She can sell th…
Lazier Salesgirl Time Limit: 2 Seconds Memory Limit: 65536 KB Kochiya Sanae is a lazy girl who makes and sells bread. She is an expert at bread making and selling. She can sell the i-th customer a piece of bread for price pi. But she is so lazy that…
题目链接:http://www.ifrog.cc/acm/problem/1143?contest=1020&no=0 题解:就是瞎暴力具体多暴力看一下代码就知道了. #include <iostream> #include <cstring> #include <queue> #include <cstdio> #include <cmath> using namespace std; typedef long long ll; ][]…
跳坑小能手 Time Limit: 2000/1000ms (Java/Others) Problem Description: GDUFE-GAME现场有一个游戏场地人头窜动,围观参与游戏的学生在场上跳来跳去.每次游戏一名参与者,且每次游戏结束时场地都会出现随机的变化(游戏过程中场地不会发生变化,只在更换参与者时变化).场地有两种类型:第一种是高台,第二种是深坑.参与者从任意高台出发向前跳,规定每次向前跳的步伐大小相同,但步伐大小由参与者自行决定,必须大于0.只要跳7次不掉入坑中,便能获得奖品…
题目描述 有$N$头奶牛,每头那牛都有一个标号$P_i1\leqslant Pi\leqslant M\leqslant N\leqslant 40,000$.现在$Farmer\  John$要把这些奶牛分成若干段,定义每段的不河蟹度为:若这段里有$k$个不同的数,那不河蟹度为$k\times k$.那总的不河蟹度就是所有段的不河蟹度的总和. 输入格式 第一行:两个整数$N,M$第$2..N+1$行:$N$个整数代表每个奶牛的编号 输出格式 一个整数,代表最小不河蟹度 样例 样例输入: 13…
题目描述 所谓最长公共子串,比如串$A:"abcde"$,串$B:"jcdkl"$,则它们的最长公共子串为串$"cd"$,即长度最长的字符串,且在两个串中都作为连续子串出现过.给定两个长度都为RnR的字符串,对于字符串大师的你来说,求它们的最长公共子串再简单不过了.所以现在你有$k$次修改机会,每次你可以选择其中某个串的某个位置,将其修改成任意字符.你需要合理使用这$k$次修改机会,使得修改之后两个串的最长公共子串最长.相信对于字符串大师的你来说…
Description Let S = s1 s2...s2n be a well-formed string of parentheses. S can be encoded in two different ways: q By an integer sequence P = p1 p2...pn where pi is the number of left parentheses before the ith right parenthesis in S (P-sequence). q B…
Kochiya Sanae is a lazy girl who makes and sells bread. She is an expert at bread making and selling. She can sell the i-th customer a piece of bread for price pi. But she is so lazy that she will fall asleep if no customer comes to buy bread for mor…