Dima, Inna and Seryozha have gathered in a room. That’s right, someone’s got to go. To cheer Seryozha up and inspire him to have a walk, Inna decided to cook something.Dima and Seryozha have n fruits i...
分类:
其他好文 时间:
2015-04-21 22:52:16
阅读次数:
137
An exam for n students will take place in a long and narrow room, so the students will sit in a line in some order. The teacher suspects that students with
adjacent numbers (i and i?+?1) always stud...
分类:
其他好文 时间:
2015-04-18 20:39:11
阅读次数:
146
A. ExamAn exam fornstudents will take place in a long and narrow room, so the students will sit in a line in some order. The teacher suspect...
分类:
其他好文 时间:
2015-04-13 18:34:01
阅读次数:
279
1、 闪回
批注:delete “T_SPC_ROOM”表,但没有commit可以用以下命令还原回来。
flashback table MW_APP.T_SPC_ROOM to before drop2、处理特殊字符
批注:插入带有&等特殊时,Oracle提示为变量。有以下两种方法:
select 'abc'||chr(38)||'efg' from dual;
sel...
分类:
数据库 时间:
2015-04-13 11:06:29
阅读次数:
287
题目链接:Codeforces Round #298 (Div. 2)A. ExamAn exam fornstudents will take place in a long and narrow room, so the students will sit in a line in some o...
分类:
其他好文 时间:
2015-04-13 09:25:37
阅读次数:
157
Description
American Carnival Makers Inc. (ACM) has a long history of designing rides and attractions. One of their more popular attractions is a fun house that includes a room of mirrors. Their ...
分类:
其他好文 时间:
2015-04-07 17:48:42
阅读次数:
175
Problem J: Jerry's trouble
Time Limit: 10 Sec Memory Limit: 256 MB
Submit: 96 Solved: 46
[Submit][Status][Web
Board]
Description
Jerry is caught by Tom. He was penned up in one room with a...
分类:
其他好文 时间:
2015-04-05 17:32:27
阅读次数:
121
优先队列,没什么好说的。
#include
#include
#include
#include
using namespace std;
//n is the people's num,and k is the num of room
int n, k;
priority_queue, greater > input,ans;
int main()
{
while (cin >>...
分类:
其他好文 时间:
2015-04-01 13:20:06
阅读次数:
137
传送门Room and MoorTime Limit: 12000/6000 MS (Java/Others)Memory Limit: 262144/262144 K (Java/Others)Total Submission(s): 1288Accepted Submission(s): 416...
分类:
其他好文 时间:
2015-03-21 17:01:58
阅读次数:
230
题意:
给定一个长度为n的,由0和1组成的序列ai,求一个序列bi,使得∑(bi-ai)^2最小。其中0
思路:显然开头为0的的部分和结尾为1的部分不用考虑
然后把其他序列划分成多个11111000形式的区域(这步也需要YY),每个区域分别求出bi(因地制宜的YY2333),求bi是二次函数的对称轴,如果bi不满足递增要求,比如bi-1>bi,所以如果不改变bi-1,bi至少要增...
分类:
其他好文 时间:
2015-03-21 14:08:46
阅读次数:
98