08 2017 档案

摘要:事务 事务的基本概念 一组要么同时执行成功,要么同时执行失败的SQL语句,是数据库操作的一个执行单元 --事务开始于 连接到数据库上,并执行一条DML语句(insert,update或者delete) 前一个事务结束,又输入了另一条DML语句. --事务结束于 执行commit或者rollback语 阅读全文
posted @ 2017-08-31 15:09 浅忆~ 阅读(154) 评论(0) 推荐(0)
摘要:使用sql要配置路径 首先到官网下载 http://dev.MySQL.com/downloads/connector/ 因为是java与数据库连接,所以选择 Connector/J download -->(mysql-connector-java-5.1.43.tar.gz) 不用登陆,鼠标下滑 阅读全文
posted @ 2017-08-28 14:33 浅忆~ 阅读(194) 评论(0) 推荐(0)
摘要:cmd 打开Dos窗口 输入: mysql -h(IP,如果是本机则为localhost) -u(user)root -p(密码) mysql -hlocalhost -uroot -p123456 进入了MySQL: >一定要注意是以分号结束 exit; (退出) create database  阅读全文
posted @ 2017-08-27 21:08 浅忆~ 阅读(146) 评论(0) 推荐(0)
摘要:Friend-Graph Time Limit: 10000/5000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 3254 Accepted Submission(s): 523 Pr 阅读全文
posted @ 2017-08-25 13:49 浅忆~ 阅读(207) 评论(0) 推荐(0)
摘要:A. Chess Tourney time limit per test 1 second memory limit per test 256 megabytes input standard input output standard output A. Chess Tourney time li 阅读全文
posted @ 2017-08-25 13:11 浅忆~ 阅读(143) 评论(0) 推荐(0)
摘要:恢复内容开始 One day Kefa found n baloons. For convenience, we denote color of i-th baloon as si — lowercase letter of the Latin alphabet. Also Kefa has k f 阅读全文
posted @ 2017-08-20 19:15 浅忆~ 阅读(149) 评论(0) 推荐(0)
摘要:Okabe needs to renovate the Future Gadget Laboratory after he tried doing some crazy experiments! The lab is represented as an n by n square grid of i 阅读全文
posted @ 2017-08-18 10:20 浅忆~ 阅读(235) 评论(0) 推荐(0)
摘要:给出N个整数,对着N个整数进行排序 Input Output Input示例 Output示例 阅读全文
posted @ 2017-08-17 16:45 浅忆~ 阅读(137) 评论(0) 推荐(0)
摘要:输入2个正整数A,B,求A与B的最小公倍数。 Input Output Input示例 Output示例 阅读全文
posted @ 2017-08-17 13:24 浅忆~ 阅读(166) 评论(0) 推荐(0)
摘要:典型例题:51nod 1135 原根 设m是正整数,a是整数,若a模m的阶等于φ(m),则称a为模m的一个原根。(其中φ(m)表示m的欧拉函数) 给出1个质数P,找出P最小的原根。 Input 输入1个质数P(3 <= P <= 10^9) Output 输出P最小的原根。 Input示例 3 Ou 阅读全文
posted @ 2017-08-17 11:16 浅忆~ 阅读(1290) 评论(0) 推荐(0)
摘要:N个人坐成一个圆环(编号为1 - N),从第1个人开始报数,数到K的人出列,后面的人重新从1开始报数。问最后剩下的人的编号。 例如:N = 3,K = 2。2号先出列,然后是1号,最后剩下的是3号。 Input Output Input示例 Output示例 F(1)=0 当有2个人的时候(N=2) 阅读全文
posted @ 2017-08-16 21:17 浅忆~ 阅读(181) 评论(0) 推荐(0)
摘要:Mister B once received a gift: it was a book about aliens, which he started read immediately. This book had c pages. At first day Mister B read v0 pag 阅读全文
posted @ 2017-08-16 17:18 浅忆~ 阅读(188) 评论(0) 推荐(0)
摘要:Problem Description 1堆石子有n个,两人轮流取.先取者第1次可以取任意多个,但不能全部取完.以后每次取的石子数不能超过上次取子数的2倍。取完者胜.先取者负输出"Second win".先取者胜输出"First win". Input 输入有多组.每组第1行是2<=n<2^31. 阅读全文
posted @ 2017-08-15 19:48 浅忆~ 阅读(282) 评论(0) 推荐(0)
摘要:vi还没配置(旧电脑,不想再折腾啦),空格缩进不合格,,请见谅 A(三位数,取第一位和最后一位) B (可以联想成求两个集合的交集) C(求最大公倍数-->两个数相乘除以两个数的最大公约数就是最小公倍数,给n个数求n个数的最小公倍数,只能遍历啦 ) D - Transit Tree Path Tim 阅读全文
posted @ 2017-08-14 21:40 浅忆~ 阅读(135) 评论(0) 推荐(0)
该文被密码保护。
posted @ 2017-08-14 17:35 浅忆~ 阅读(0) 评论(0) 推荐(0)
摘要:There are n cities and n - 1 roads in the Seven Kingdoms, each road connects two cities and we can reach any city from any other by the roads. Theon a 阅读全文
posted @ 2017-08-13 17:30 浅忆~ 阅读(230) 评论(0) 推荐(0)
摘要:1:输入 vim 文件名.cpp 2:进行编辑,编辑操作参考 >初识vim 主要三个步骤 :1)输入字母 i , 进入插入编写模式,编写完成后,按esc 退出编写模式,按:wq ,保存并退出,有时需要再wq后加!号 3:输入 g++ 文件名.cpp -o 文件名 ,报错就看看错在哪里,然后再输入-- 阅读全文
posted @ 2017-08-13 11:34 浅忆~ 阅读(403) 评论(0) 推荐(0)
摘要:Bran and his older sister Arya are from the same house. Bran like candies so much, so Arya is going to give him some Candies. At first, Arya and Bran 阅读全文
posted @ 2017-08-13 11:12 浅忆~ 阅读(203) 评论(0) 推荐(0)
摘要:Problem Description HDU’s n classrooms are on a line ,which can be considered as a number line. Each classroom has a coordinate. Now Little Q wants to 阅读全文
posted @ 2017-08-12 09:40 浅忆~ 阅读(174) 评论(0) 推荐(0)
摘要:Problem Description Welcome to HDU to take part in the second CCPC girls’ competition! A new automatic judge system is used for this competition. Duri 阅读全文
posted @ 2017-08-11 10:58 浅忆~ 阅读(318) 评论(0) 推荐(1)
摘要:Problem Description The contest starts now! How excited it is to see balloons floating around. You, one of the best programmers in HDU, can get a very 阅读全文
posted @ 2017-08-10 21:14 浅忆~ 阅读(198) 评论(0) 推荐(0)
摘要:先介绍怎么建文件目录,,然后使用vi !ls ls !dir 可以列出当前目录的内容 , ls -l 竖排 ls -m横排 mkdir 建目录 rmdir 只能删空目录 , 若不为空则用 rm -r dl (递归删除,但是会把你要删除的每一个都问一遍,可回答:Y N) rm -rf dl (不用询问 阅读全文
posted @ 2017-08-09 20:16 浅忆~ 阅读(222) 评论(0) 推荐(0)
该文被密码保护。
posted @ 2017-08-09 11:59 浅忆~ 阅读(5) 评论(0) 推荐(0)
摘要:Jessica's a very lovely girl wooed by lots of boys. Recently she has a problem. The final exam is coming, yet she has spent little time on it. If she 阅读全文
posted @ 2017-08-09 11:54 浅忆~ 阅读(108) 评论(0) 推荐(0)
摘要:Background Professor Hopper is researching the sexual behavior of a rare species of bugs. He assumes that they feature two different genders and that 阅读全文
posted @ 2017-08-09 11:52 浅忆~ 阅读(149) 评论(0) 推荐(0)
摘要:Farmer John wants to repair a small length of the fence around the pasture. He measures the fence and finds that he needs N (1 ≤ N ≤ 20,000) planks of 阅读全文
posted @ 2017-08-09 11:49 浅忆~ 阅读(107) 评论(0) 推荐(0)
摘要:In a highly developed alien society, the habitats are almost infinite dimensional space. In the history of this planet,there is an old puzzle. You hav 阅读全文
posted @ 2017-08-09 11:48 浅忆~ 阅读(140) 评论(0) 推荐(0)
摘要:Recently your team noticed that the computer you use to practice for programming contests is not good enough anymore. Therefore, you decide to buy a n 阅读全文
posted @ 2017-08-09 11:46 浅忆~ 阅读(145) 评论(0) 推荐(0)
摘要:Adam and Eve enter this year's ACM International Collegiate Programming Contest. Last night, they played the Calendar Game, in celebration of this con 阅读全文
posted @ 2017-08-09 11:45 浅忆~ 阅读(220) 评论(0) 推荐(0)
摘要:https://odzkskevi.qnssl.com/cd5694d5c85f39f2036f7473917563e5?v=1502195814 阅读全文
posted @ 2017-08-09 11:43 浅忆~ 阅读(152) 评论(0) 推荐(0)
摘要:Each New Year Timofey and his friends cut down a tree of n vertices and bring it home. After that they paint all the n its vertices, so that the i-th 阅读全文
posted @ 2017-08-09 11:41 浅忆~ 阅读(113) 评论(0) 推荐(0)
摘要:湫湫减肥 越减越肥! 最近,减肥失败的湫湫为发泄心中郁闷,在玩一个消灭免子的游戏。 游戏规则很简单,用箭杀死免子即可。 箭是一种消耗品,已知有M种不同类型的箭可以选择,并且每种箭都会对兔子造成伤害,对应的伤害值分别为Di(1 <= i <= M),每种箭需要一定的QQ币购买。 假设每种箭只能使用一次 阅读全文
posted @ 2017-08-09 11:40 浅忆~ 阅读(150) 评论(0) 推荐(0)
摘要:Comrade Dujikov is busy choosing artists for Timofey's birthday and is recieving calls from Taymyr from Ilia-alpinist. Ilia-alpinist calls every n min 阅读全文
posted @ 2017-08-09 11:37 浅忆~ 阅读(162) 评论(0) 推荐(0)
摘要:https://odzkskevi.qnssl.com/8b9d8bb43198f28efe782047d56ab361?v=1501987995 阅读全文
posted @ 2017-08-09 11:36 浅忆~ 阅读(193) 评论(0) 推荐(0)
摘要:Bimokh is Mashmokh's boss. For the following ndays he decided to pay to his workers in a new way. At the beginning of each day he will give each worke 阅读全文
posted @ 2017-08-09 11:34 浅忆~ 阅读(129) 评论(0) 推荐(0)
摘要:The branch of mathematics called number theory is about properties of numbers. One of the areas that has captured the interest of number theoreticians 阅读全文
posted @ 2017-08-09 11:32 浅忆~ 阅读(140) 评论(0) 推荐(0)
摘要:在每年的校赛里,所有进入决赛的同学都会获得一件很漂亮的T-shirt。但是每当我们的工作人员把上百件的衣服从商店运回到赛场的时候,却是非常累的!所以现在他们想要寻找最短的从商店到赛场的路线,你可以帮助他们吗? Input 输入包括多组数据。 每组数据第一行是两个整数NN,MM(N≤100N≤100, 阅读全文
posted @ 2017-08-09 11:29 浅忆~ 阅读(185) 评论(0) 推荐(0)
摘要:Max wants to buy a new skateboard. He has calculated the amount of money that is needed to buy a new skateboard. He left a calculator on the floor and 阅读全文
posted @ 2017-08-09 11:28 浅忆~ 阅读(227) 评论(0) 推荐(0)
摘要:Statements A sequence of positive and non-zero integers called palindromic if it can be read the same forward and backward, for example: 15 2 6 4 6 2 阅读全文
posted @ 2017-08-09 11:25 浅忆~ 阅读(192) 评论(0) 推荐(0)
摘要:Statements This is the first day for you at your new job and your boss asks you to copy some files from one computer to other computers in an informat 阅读全文
posted @ 2017-08-09 11:23 浅忆~ 阅读(160) 评论(0) 推荐(0)
摘要:A subsequence of a given sequence is the given sequence with some elements (possible none) left out. Given a sequence X = <x1, x2, ..., xm> another se 阅读全文
posted @ 2017-08-09 11:21 浅忆~ 阅读(116) 评论(0) 推荐(0)
摘要:https://odzkskevi.qnssl.com/516b2b3ad824ada50248f23d20f53083?v=1502089438 阅读全文
posted @ 2017-08-09 11:17 浅忆~ 阅读(159) 评论(0) 推荐(0)
摘要:这天,AutSky_JadeKAutSky_JadeK看到了nn张图片,他忍不住说道:“我TMTM社保!”。 每张图片有一个社保值,他可以合并两张图片,合并所得的图片的社保值是原来两张图片的社保值之和。 每次合并需要消耗的体力也是原来两张图片的社保值之和。 显然,n−1n−1次合并之后,只剩下一张图 阅读全文
posted @ 2017-08-09 11:15 浅忆~ 阅读(165) 评论(0) 推荐(0)
摘要:https://odzkskevi.qnssl.com/8d68abfe6e32509b1c446b13c725b0e4?v=1501696926 阅读全文
posted @ 2017-08-09 11:13 浅忆~ 阅读(171) 评论(0) 推荐(0)
摘要:Statements Alice and Bob play the following game. They choose a number N to play with. The rules are as follows: - They write each number from 1 to N 阅读全文
posted @ 2017-08-09 11:10 浅忆~ 阅读(176) 评论(0) 推荐(0)
摘要:Let's define the function f(n)=⌊n−−√⌋f(n)=⌊n⌋. Bo wanted to know the minimum number yy which satisfies fy(n)=1fy(n)=1. note:f1(n)=f(n),fy(n)=f(fy−1(n) 阅读全文
posted @ 2017-08-09 11:06 浅忆~ 阅读(145) 评论(0) 推荐(0)
摘要:There are n houses in the village and some bidirectional roads connecting them. Every day peole always like to ask like this "How far is it if I want 阅读全文
posted @ 2017-08-09 11:02 浅忆~ 阅读(289) 评论(0) 推荐(0)
摘要:A rooted tree is a well-known data structure in computer science and engineering. An example is shown below: In the figure, each node is labeled with 阅读全文
posted @ 2017-08-09 10:59 浅忆~ 阅读(143) 评论(0) 推荐(0)
摘要:1 #include 2 #include 3 using namespace std; 4 5 int main() 6 { string s="傻狗"; 7 for (float y=1.3;y>=-1.1;y-=0.06) 8 { 9 int index=0; 10 for(float x=-1.1;x<=1.1;x+=0.025) 11 ... 阅读全文
posted @ 2017-08-09 10:53 浅忆~ 阅读(118) 评论(0) 推荐(0)
摘要:1 /* 2 题目描述 3 4 有两个日期,求两个日期之间的天数,如果两个日期是连续的,则规定它们之间的天数为两天。 5 输入格式 6 7 有多组数据,每组数据有两行,分别表示两个日期,形式为YYYYMMDD 8 输入格式 9 10 每组数据输出一行,即日期差值 11 样例输入 12 13 20130101 14 20130105 15 样例输出 16 17 5 18... 阅读全文
posted @ 2017-08-09 10:52 浅忆~ 阅读(256) 评论(0) 推荐(0)
摘要:1 /* 2 题目描述 3 输入两个非负十进制整数A和B( 24 #include 25 using namespace std; 26 27 int main() 28 { int a,b,d; 29 scanf("%d%d%d",&a,&b,&d); 30 int sum=a+b; 31 int ans[31],num=0; //ans存放D进制... 阅读全文
posted @ 2017-08-09 10:50 浅忆~ 阅读(146) 评论(0) 推荐(0)
摘要:/* 题目描述 给定一个英语,要求编写程序,将句中所有单词按颠倒顺序输出 输入格式 测试输入包含一个测试用例,在一行内给出总长度不超过80的字符串。字符串由若干单 词和若干空格组成,其中单词是由英文字母(大小写有区分)组成的字符串,单词之间用1个 空格分开,输入保证句子末尾没有多余的空格。 输入格式 每个测试用例的输出展一行,出倒叙后的句子。 样例输入 Hello World Here I... 阅读全文
posted @ 2017-08-09 10:49 浅忆~ 阅读(282) 评论(0) 推荐(0)
摘要:There are N jobs to be finished. It takes a robot 1 hour to finish one job. At the beginning you have only one robot. Luckily a robot may build more r 阅读全文
posted @ 2017-08-09 10:46 浅忆~ 阅读(150) 评论(0) 推荐(0)
摘要:Saitama accidentally destroyed a hotel again. To repay the hotel company, Genos has volunteered to operate an elevator in one of its other hotels. The 阅读全文
posted @ 2017-08-09 10:43 浅忆~ 阅读(116) 评论(0) 推荐(0)
摘要:Problem Description C国的死对头A国这段时间正在进行军事演习,所以C国间谍头子Derek和他手下Tidy又开始忙乎了。A国在海岸线沿直线布置了N个工兵营地,Derek和Tidy的任务就是要监视这些工兵营地的活动情况。由于采取了某种先进的监测手段,所以每个工兵营地的人数C国都掌握的 阅读全文
posted @ 2017-08-09 10:39 浅忆~ 阅读(122) 评论(0) 推荐(0)
摘要:Problem Description 看病要排队这个是地球人都知道的常识。不过经过细心的0068的观察,他发现了医院里排队还是有讲究的。0068所去的医院有三个医生(汗,这么少)同时看病。而看病的人病情有轻重,所以不能根据简单的先来先服务的原则。所以医院对每种病情规定了10种不同的优先级。级别为1 阅读全文
posted @ 2017-08-09 10:33 浅忆~ 阅读(148) 评论(0) 推荐(0)
摘要:Problem Description The WHU ACM Team has a big cup, with which every member drinks water. Now, we know the volume of the water in the cup, can you tel 阅读全文
posted @ 2017-08-09 10:09 浅忆~ 阅读(108) 评论(0) 推荐(0)
摘要:Problem Description 有三个正整数a,b,c(0<a,b,c<10^6),其中c不等于b。若a和c的最大公约数为b,现已知a和b,求满足条件的最小的c。 Input 第一行输入一个n,表示有n组测试数据,接下来的n行,每行输入两个正整数a,b。 Output 输出对应的c,每组测试 阅读全文
posted @ 2017-08-09 10:05 浅忆~ 阅读(161) 评论(0) 推荐(0)
摘要:Problem Description You want to processe a sequence of n distinct integers by swapping two adjacent sequence elements until the sequence is sorted in 阅读全文
posted @ 2017-08-09 10:03 浅忆~ 阅读(114) 评论(0) 推荐(0)
摘要:Problem Description As we all know, machine scheduling is a very classical problem in computer science and has been studied for a very long history. S 阅读全文
posted @ 2017-08-09 09:52 浅忆~ 阅读(147) 评论(0) 推荐(0)
摘要:A square number is an integer number whose square root is also an integer. For example 1, 4, 81 are some square numbers. Given two numbers a and b you 阅读全文
posted @ 2017-08-09 09:49 浅忆~ 阅读(197) 评论(0) 推荐(0)
摘要:Watchmen are in a danger and Doctor Manhattan together with his friend Daniel Dreiberg should warn them as soon as possible. There are n watchmen on a 阅读全文
posted @ 2017-08-09 09:45 浅忆~ 阅读(146) 评论(0) 推荐(0)
摘要:There are n pictures delivered for the new exhibition. The i-th painting has beauty ai. We know that a visitor becomes happy every time he passes from 阅读全文
posted @ 2017-08-09 09:43 浅忆~ 阅读(177) 评论(0) 推荐(0)
摘要:Friends are going to play console. They have two joysticks and only one charger for them. Initially first joystick is charged at a1 percent and second 阅读全文
posted @ 2017-08-09 09:41 浅忆~ 阅读(171) 评论(0) 推荐(0)
摘要:A big marathon is held on Al-Maza Road, Damascus. Runners came from all over the world to run all the way along the road in this big marathon day. The 阅读全文
posted @ 2017-08-09 09:22 浅忆~ 阅读(236) 评论(0) 推荐(0)
摘要:Some natural number was written on the board. Its sum of digits was not less than k. But you were distracted a bit, and someone changed this number to 阅读全文
posted @ 2017-08-08 17:41 浅忆~ 阅读(163) 评论(0) 推荐(0)
摘要:Two boys decided to compete in text typing on the site "Key races". During the competition, they have to type a text consisting of s characters. The f 阅读全文
posted @ 2017-08-08 17:39 浅忆~ 阅读(110) 评论(0) 推荐(0)
该文被密码保护。
posted @ 2017-08-08 17:37 浅忆~ 阅读(1) 评论(0) 推荐(0)
摘要:A. The Useless Toy time limit per test1 second memory limit per test256 megabytes inputstandard input outputstandard output Walking through the street 阅读全文
posted @ 2017-08-08 17:35 浅忆~ 阅读(105) 评论(0) 推荐(0)
摘要:It's hard times now. Today Petya needs to score 100 points on Informatics exam. The tasks seem easy to Petya, but he thinks he lacks time to finish th 阅读全文
posted @ 2017-08-08 17:30 浅忆~ 阅读(153) 评论(0) 推荐(0)
摘要:It's one more school day now. Sasha doesn't like classes and is always bored at them. So, each day he invents some game and plays in it alone or with 阅读全文
posted @ 2017-08-08 17:28 浅忆~ 阅读(121) 评论(0) 推荐(0)
该文被密码保护。
posted @ 2017-08-08 17:27 浅忆~ 阅读(0) 评论(0) 推荐(0)
该文被密码保护。
posted @ 2017-08-08 17:26 浅忆~ 阅读(0) 评论(0) 推荐(0)
摘要:There are two popular keyboard layouts in Berland, they differ only in letters positions. All the other keys are the same. In Berland they use alphabe 阅读全文
posted @ 2017-08-08 17:24 浅忆~ 阅读(254) 评论(0) 推荐(0)
摘要:Array of integers is unimodal, if: it is strictly increasing in the beginning; after that it is constant; after that it is strictly decreasing. The fi 阅读全文
posted @ 2017-08-08 17:22 浅忆~ 阅读(193) 评论(0) 推荐(0)
该文被密码保护。
posted @ 2017-08-08 17:20 浅忆~ 阅读(0) 评论(0) 推荐(0)
摘要:Ivan had string s consisting of small English letters. However, his friend Julia decided to make fun of him and hid the string s. Ivan preferred makin 阅读全文
posted @ 2017-08-08 17:16 浅忆~ 阅读(179) 评论(0) 推荐(0)
摘要:Polycarp has a checkered sheet of paper of size n × m. Polycarp painted some of cells with black, the others remained white. Inspired by Malevich's "B 阅读全文
posted @ 2017-08-08 17:14 浅忆~ 阅读(165) 评论(0) 推荐(0)
摘要:In a small restaurant there are a tables for one person and b tables for two persons. It it known that n groups of people come today, each consisting 阅读全文
posted @ 2017-08-08 17:13 浅忆~ 阅读(215) 评论(0) 推荐(0)
摘要:Erelong Leha was bored by calculating of the greatest common divisor of two factorials. Therefore he decided to solve some crosswords. It's well known 阅读全文
posted @ 2017-08-08 17:10 浅忆~ 阅读(222) 评论(0) 推荐(0)
摘要:Holidays have finished. Thanks to the help of the hacker Leha, Noora managed to enter the university of her dreams which is located in a town Pavlopol 阅读全文
posted @ 2017-08-08 17:08 浅忆~ 阅读(103) 评论(0) 推荐(0)
摘要:On his trip to Luxor and Aswan, Sagheer went to a Nubian market to buy some souvenirs for his friends and relatives. The market has some strange rules 阅读全文
posted @ 2017-08-08 17:06 浅忆~ 阅读(219) 评论(0) 推荐(0)
该文被密码保护。
posted @ 2017-08-08 17:05 浅忆~ 阅读(0) 评论(0) 推荐(0)
摘要:Sagheer is walking in the street when he comes to an intersection of two roads. Each road can be represented as two parts where each part has 3 lanes 阅读全文
posted @ 2017-08-08 16:58 浅忆~ 阅读(109) 评论(0) 推荐(0)
摘要:Vladik had started reading a complicated book about algorithms containing n pages. To improve understanding of what is written, his friends advised hi 阅读全文
posted @ 2017-08-08 16:57 浅忆~ 阅读(156) 评论(0) 推荐(0)
摘要:At regular competition Vladik and Valera won a and b candies respectively. Vladik offered 1 his candy to Valera. After that Valera gave Vladik 2 his c 阅读全文
posted @ 2017-08-08 16:54 浅忆~ 阅读(114) 评论(0) 推荐(0)
摘要:D. Round Subset time limit per test 2 seconds memory limit per test 256 megabytes input standard input output standard output D. Round Subset time lim 阅读全文
posted @ 2017-08-08 16:52 浅忆~ 阅读(143) 评论(0) 推荐(0)
摘要:B. Flag of Berland time limit per test 1 second memory limit per test 256 megabytes input standard input output standard output B. Flag of Berland tim 阅读全文
posted @ 2017-08-08 16:46 浅忆~ 阅读(142) 评论(0) 推荐(0)
摘要:A. Text Volume A. Text Volume You are given a text of single-space separated words, consisting of small and capital Latin letters. Volume of the word 阅读全文
posted @ 2017-08-08 16:43 浅忆~ 阅读(178) 评论(0) 推荐(0)
摘要:Polycarp has just invented a new binary protocol for data transmission. He is encoding positive integer decimal number to binary string using followin 阅读全文
posted @ 2017-08-08 16:41 浅忆~ 阅读(312) 评论(0) 推荐(0)
摘要:Sometimes some words like "localization" or "internationalization" are so long that writing them many times in one text is quite tiresome. Let's consi 阅读全文
posted @ 2017-08-08 16:34 浅忆~ 阅读(424) 评论(0) 推荐(0)
摘要:One hot summer day Pete and his friend Billy decided to buy a watermelon. They chose the biggest and the ripest one, in their opinion. After that the 阅读全文
posted @ 2017-08-08 16:33 浅忆~ 阅读(304) 评论(0) 推荐(0)
摘要:Theatre Square in the capital city of Berland has a rectangular shape with the size n × m meters. On the occasion of the city's anniversary, a decisio 阅读全文
posted @ 2017-08-08 16:30 浅忆~ 阅读(268) 评论(0) 推荐(0)
摘要:One day three best friends Petya, Vasya and Tonya decided to form a team and take part in programming contests. Participants are usually offered sever 阅读全文
posted @ 2017-08-08 16:29 浅忆~ 阅读(212) 评论(0) 推荐(0)
摘要:Petya started to attend programming lessons. On the first lesson his task was to write a simple program. The program was supposed to do the following: 阅读全文
posted @ 2017-08-08 16:27 浅忆~ 阅读(308) 评论(0) 推荐(0)
摘要:There are n stones on the table in a row, each of them can be red, green or blue. Count the minimum number of stones to take from the table so that an 阅读全文
posted @ 2017-08-08 16:25 浅忆~ 阅读(221) 评论(0) 推荐(0)
摘要:Little Petya loves presents. His mum bought him two strings of the same size for his birthday. The strings consist of uppercase and lowercase Latin le 阅读全文
posted @ 2017-08-08 16:23 浅忆~ 阅读(302) 评论(0) 推荐(0)
摘要:"Contestant who earns a score equal to or greater than the k-th place finisher's score will advance to the next round, as long as the contestant earns 阅读全文
posted @ 2017-08-08 16:21 浅忆~ 阅读(288) 评论(1) 推荐(0)
摘要:Xenia the beginner mathematician is a third year student at elementary school. She is now learning the addition operation. The teacher has written dow 阅读全文
posted @ 2017-08-08 16:16 浅忆~ 阅读(398) 评论(0) 推荐(0)
摘要:Petya loves football very much. One day, as he was watching a football match, he was writing the players' current positions on a piece of paper. To si 阅读全文
posted @ 2017-08-08 16:13 浅忆~ 阅读(357) 评论(0) 推荐(0)
摘要:You are given a rectangular board of M × N squares. Also you are given an unlimited number of standard domino pieces of 2 × 1 squares. You are allowed 阅读全文
posted @ 2017-08-08 16:10 浅忆~ 阅读(491) 评论(0) 推荐(0)
摘要:The classic programming language of Bitland is Bit++. This language is so peculiar and complicated. The language is that peculiar as it has exactly on 阅读全文
posted @ 2017-08-08 16:07 浅忆~ 阅读(308) 评论(0) 推荐(0)
摘要:Problem Description Contest time again! How excited it is to see balloons floating around. But to tell you a secret, the judges' favorite time is gues 阅读全文
posted @ 2017-08-08 16:02 浅忆~ 阅读(143) 评论(0) 推荐(0)
摘要:Problem Description Ignatius最近遇到一个难题,老师交给他很多单词(只有小写字母组成,不会有重复的单词出现),现在老师要他统计出以某个字符串为前缀的单词数量(单词本身也是自己的前缀). Input 输入数据的第一部分是一张单词表,每行一个单词,单词的长度不超过10,它们代表 阅读全文
posted @ 2017-08-08 15:59 浅忆~ 阅读(120) 评论(0) 推荐(0)
摘要:巴什博弈 博弈的前提是,双方都是最聪明的且不会出错 有一个数量为n的一堆物品,两个人轮流从这堆物品中取物,规定每次至少取一个,最多取m个 分析:n=m+1个,最大限制是m,所以无论前者取走多少个,后者都能取走剩余的物品,所以后者取胜 取胜法则:先普及一个知识,对于任意一个自然数n,我们都可以把它写成 阅读全文
posted @ 2017-08-08 15:47 浅忆~ 阅读(204) 评论(0) 推荐(0)
摘要:Problem Description 虽然不想,但是现实总归是现实,Lele始终没有逃过退学的命运,因为他没有拿到奖学金。现在等待他的,就是像FarmJohn一样的农田生涯。要种田得有田才行,Lele听说街上正在举行一场别开生面的拍卖会,拍卖的物品正好就是一块20亩的田地。于是,Lele带上他的全 阅读全文
posted @ 2017-08-08 15:43 浅忆~ 阅读(132) 评论(0) 推荐(0)
摘要:Problem Description 一年在外 父母时刻牵挂春节回家 你能做几天好孩子吗寒假里尝试做做下面的事情吧陪妈妈逛一次菜场悄悄给爸爸买个小礼物主动地 强烈地 要求洗一次碗某一天早起 给爸妈用心地做回早餐如果愿意 你还可以和爸妈说咱们玩个小游戏吧 ACM课上学的呢~下面是一个二人小游戏:桌子 阅读全文
posted @ 2017-08-08 15:35 浅忆~ 阅读(183) 评论(0) 推荐(0)
该文被密码保护。
posted @ 2017-08-08 15:28 浅忆~ 阅读(1) 评论(0) 推荐(0)
摘要:1 //优先队列的使用 2 #include 3 #include 4 #include 5 #include 6 using namespace std; 7 //定义结构,使用运算符重载,自定义优先级(1) 8 struct cmp1{ 9 bool operator()(int &a,int &b){ 10 return a>b; /... 阅读全文
posted @ 2017-08-08 15:24 浅忆~ 阅读(141) 评论(0) 推荐(0)
摘要:Description A numeric sequence of ai is ordered if a1 < a2 < ... < aN. Let the subsequence of the given numeric sequence (a1, a2, ..., aN) be any sequ 阅读全文
posted @ 2017-08-08 15:19 浅忆~ 阅读(119) 评论(0) 推荐(0)
摘要:Problem Description We are all familiar with sorting algorithms: quick sort, merge sort, heap sort, insertion sort, selection sort, bubble sort, etc. 阅读全文
posted @ 2017-08-08 15:13 浅忆~ 阅读(149) 评论(0) 推荐(0)
摘要:Problem Description A subsequence of a given sequence is the given sequence with some elements (possible none) left out. Given a sequence X = <x1, x2, 阅读全文
posted @ 2017-08-08 15:01 浅忆~ 阅读(181) 评论(0) 推荐(0)
摘要:Time Limit: 5000MS Memory Limit: 30000K Total Submissions: 3704 Accepted: 1044 Description There is an old stone game.At the beginning of the game the 阅读全文
posted @ 2017-08-08 14:41 浅忆~ 阅读(347) 评论(0) 推荐(0)
摘要:1 #include <iostream> 2 #include <string.h> 3 #include <algorithm> 4 #include <stdio.h> 5 using namespace std; 6 long long gcd(long long a,long long b 阅读全文
posted @ 2017-08-08 14:26 浅忆~ 阅读(139) 评论(0) 推荐(0)
该文被密码保护。
posted @ 2017-08-08 14:24 浅忆~ 阅读(1) 评论(0) 推荐(0)
该文被密码保护。
posted @ 2017-08-08 14:14 浅忆~ 阅读(3) 评论(0) 推荐(0)
摘要:/*cin慢是有原因的,其实默认的时候,cin与stdin总是保持同步的,也就是说这两种方法可以混用,而不必担心文件指针混乱,同时cout和stdout也一样,两者混用不会输出顺序错乱。正因为这个兼容性的特性,导致cin有许多额外的开销,如何禁用这个特性呢?只需一个语句std::ios::sync_ 阅读全文
posted @ 2017-08-08 13:09 浅忆~ 阅读(111) 评论(0) 推荐(0)
摘要:/*带权并查集带权值的并查集只不过是在并查集中加入了一个value[]数组value[]可以记录很多东西,也可是类似距离这种东西,也可以是相对于根节点的状态加入了权值,相对于并查集函数有些改变*/ 1 int findfat(int x){ 2 if(fat[x]==x) return x; 3 i 阅读全文
posted @ 2017-08-08 12:57 浅忆~ 阅读(235) 评论(0) 推荐(0)
摘要:给出N个正整数,检测每个数是否为质数。如果是,输出"Yes",否则输出"No"。 给出N个正整数,检测每个数是否为质数。如果是,输出"Yes",否则输出"No"。 Input 第1行:一个数N,表示正整数的数量。(1 <= N <= 1000) 第2 - N + 1行:每行1个数(2 <= S[i] 阅读全文
posted @ 2017-08-08 12:54 浅忆~ 阅读(172) 评论(0) 推荐(0)
摘要:Problem Description CC always becomes very depressed at the end of this month, he has checked his credit card yesterday, without any surprise, there a 阅读全文
posted @ 2017-08-08 12:51 浅忆~ 阅读(184) 评论(0) 推荐(0)
摘要:Problem Description The French author Georges Perec (1936–1982) once wrote a book, La disparition, without the letter 'e'. He was a member of the Ouli 阅读全文
posted @ 2017-08-08 12:32 浅忆~ 阅读(171) 评论(0) 推荐(0)
摘要:Problem Description Astronomers often examine star maps where stars are represented by points on a plane and each star has Cartesian coordinates. Let 阅读全文
posted @ 2017-08-08 10:07 浅忆~ 阅读(160) 评论(0) 推荐(0)
摘要:Time Limit: 1000MS Memory Limit: 65536K Total Submissions: 15909 Accepted: 6728 Description A sequence of N positive integers (10 < N < 100 000), each 阅读全文
posted @ 2017-08-08 08:49 浅忆~ 阅读(110) 评论(0) 推荐(0)
摘要:M * N的方格,一个机器人从左上走到右下,只能向右或向下走。有多少种不同的走法?由于方法数量可能很大,只需要输出Mod 10^9 + 7的结果。 M * N的方格,一个机器人从左上走到右下,只能向右或向下走。有多少种不同的走法?由于方法数量可能很大,只需要输出Mod 10^9 + 7的结果。 M 阅读全文
posted @ 2017-08-07 21:58 浅忆~ 阅读(502) 评论(0) 推荐(0)
摘要:Description A number of students are members of a club that travels annually to exotic locations. Their destinations in the past have included Indiana 阅读全文
posted @ 2017-08-07 21:20 浅忆~ 阅读(370) 评论(0) 推荐(0)
摘要:Problem Description N个气球排成一排,从左到右依次编号为1,2,3....N.每次给定2个整数a b(a <= b),lele便为骑上他的“小飞鸽"牌电动车从气球a开始到气球b依次给每个气球涂一次颜色。但是N次以后lele已经忘记了第I个气球已经涂过几次颜色了,你能帮他算出每个气 阅读全文
posted @ 2017-08-07 20:31 浅忆~ 阅读(153) 评论(0) 推荐(0)
摘要:Description The little cat is so famous, that many couples tramp over hill and dale to Byteland, and asked the little cat to give names to their newly 阅读全文
posted @ 2017-08-07 17:37 浅忆~ 阅读(133) 评论(0) 推荐(0)
摘要:详细点击一下链接(背包九讲) http://love-oriented.com/pack/Index.html#sec1 以下内容,有些自己想法,有些摘录 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 阅读全文
posted @ 2017-08-07 17:20 浅忆~ 阅读(272) 评论(0) 推荐(0)
摘要:time limit per test 1 second memory limit per test 256 megabytes input standard input output standard output time limit per test 1 second time limit p 阅读全文
posted @ 2017-08-06 18:45 浅忆~ 阅读(183) 评论(0) 推荐(0)
摘要:Problem DescriptionGiven two sequences of numbers : a[1], a[2], ...... , a[N], and b[1], b[2], ...... , b[M] (1 <= M <= 10000, 1 <= N <= 1000000). You 阅读全文
posted @ 2017-08-06 15:10 浅忆~ 阅读(178) 评论(0) 推荐(0)
摘要:time limit per test 1 second memory limit per test 256 megabytes input standard input output standard output time limit per test 1 second time limit p 阅读全文
posted @ 2017-08-05 20:31 浅忆~ 阅读(141) 评论(0) 推荐(0)
摘要:基准时间限制:1 秒 空间限制:131072 KB 分值: 0 难度:基础题 基准时间限制:1 秒 空间限制:131072 KB 分值: 0 难度:基础题 基准时间限制:1 秒 空间限制:131072 KB 分值: 0 难度:基础题 Input 第1行:大数A 第2行:大数B (A,B的长度 <=  阅读全文
posted @ 2017-08-05 20:22 浅忆~ 阅读(146) 评论(0) 推荐(0)
摘要:输入2个正整数A,B,求A与B的最大公约数。 输入2个正整数A,B,求A与B的最大公约数。 输入2个正整数A,B,求A与B的最大公约数。 Input 2个数A,B,中间用空格隔开。(1<= A,B <= 10^9) Output 输出A与B的最大公约数。 Input示例 30 105 Output示 阅读全文
posted @ 2017-08-05 20:17 浅忆~ 阅读(176) 评论(0) 推荐(0)
摘要:给出长度为N的数组,找出这个数组的最长递增子序列。(递增子序列是指,子序列的元素是递增的) 例如:5 1 6 8 2 4 5 10,最长递增子序列是1 2 4 5 10。 给出长度为N的数组,找出这个数组的最长递增子序列。(递增子序列是指,子序列的元素是递增的) 例如:5 1 6 8 2 4 5 1 阅读全文
posted @ 2017-08-05 20:14 浅忆~ 阅读(125) 评论(0) 推荐(0)
摘要:输入N和P(P为质数),求N! Mod P = ? (Mod 就是求模 %) 例如:n = 10, P = 11,10! = 3628800 3628800 % 11 = 10 输入N和P(P为质数),求N! Mod P = ? (Mod 就是求模 %) 例如:n = 10, P = 11,10! 阅读全文
posted @ 2017-08-05 17:18 浅忆~ 阅读(181) 评论(0) 推荐(0)
摘要:输入N求N的阶乘的10进制表示的长度。例如6! = 720,长度为3。 输入N求N的阶乘的10进制表示的长度。例如6! = 720,长度为3。 Input 第1行:一个数T,表示后面用作输入测试的数的数量。(1 <= T <= 1000) 第2 - T + 1行:每行1个数N。(1 <= N <=  阅读全文
posted @ 2017-08-05 16:13 浅忆~ 阅读(284) 评论(0) 推荐(0)
摘要:动态规划 公共子序列(LCS) 以hdu1159为例 推理过程 记:xi x序列的前i个字符(前缀)yj y序列的前j个字符(前缀)z=LCS(x,y)长度为k 1、若xm=yn(最后一个字符相同),则不难用反证法证明: 该字符必须是x与y序列的任一最长公共子序列z的最后一个字符,即zk=xm=yn 阅读全文
posted @ 2017-08-05 14:30 浅忆~ 阅读(509) 评论(0) 推荐(0)