03 2018 档案

摘要:poj1321 棋盘问题 在一个给定形状的棋盘(形状可能是不规则的)上面摆放棋子,棋子没有区别。要求摆放时任意的两个棋子不能放在棋盘中的同一行或者同一列,请编程求解对于给定形状和大小的棋盘,摆放k个棋子的所有可行的摆放方案C。 Input 输入含有多组测试数据。 每组数据的第一行是两个正整数,n k 阅读全文
posted @ 2018-03-29 22:23 冥想选手 阅读(283) 评论(0) 推荐(0) 编辑
摘要:There are several ancient Greek texts that contain descriptions of the fabled island Atlantis. Some of these texts even include maps of parts of the i 阅读全文
posted @ 2018-03-27 21:29 冥想选手 阅读(284) 评论(0) 推荐(0) 编辑
摘要:poj3667 HotelTime Limit: 3000MS Memory Limit: 65536KTotal Submissions: 18925 Accepted: 8242Description The cows are journeying north to Thunder Bay in 阅读全文
posted @ 2018-03-19 21:17 冥想选手 阅读(189) 评论(0) 推荐(0) 编辑
摘要:Mayor's posters Time Limit: 1000MS Memory Limit: 65536K Total Submissions: 51098 Accepted: 14788 Description The citizens of Bytetown, AB, could not s 阅读全文
posted @ 2018-03-17 16:22 冥想选手 阅读(148) 评论(0) 推荐(0) 编辑
摘要:Buy Tickets Time Limit: 4000MS Memory Limit: 65536K Total Submissions: 22097 Accepted: 10834 Description Railway tickets were difficult to buy around 阅读全文
posted @ 2018-03-16 20:53 冥想选手 阅读(151) 评论(0) 推荐(0) 编辑
摘要:1798: [Ahoi2009]Seq 维护序列seq Description 老师交给小可可一个维护数列的任务,现在小可可希望你来帮他完成。 有长为N的数列,不妨设为a1,a2,…,aN 。有如下三种操作形式: (1)把数列中的一段数全部乘一个值; (2)把数列中的一段数全部加一个值; (3)询问 阅读全文
posted @ 2018-03-15 22:18 冥想选手 阅读(169) 评论(0) 推荐(0) 编辑
摘要:【codevs1690】开关灯 2014年2月15日4930 题目描述 Description YYX家门前的街上有N(2<=N<=100000)盏路灯,在晚上六点之前,这些路灯全是关着的,六点之后,会有M(2<=m<=100000)个人陆续按下开关,这些开关可以改变从第i盏灯到第j盏灯的状态,现在 阅读全文
posted @ 2018-03-14 22:01 冥想选手 阅读(192) 评论(0) 推荐(0) 编辑
摘要:【codevs1191】数轴染色 题目描述 Description 在一条数轴上有N个点,分别是1~N。一开始所有的点都被染成黑色。接着我们进行M次操作,第i次操作将[Li,Ri]这些点染成白色。请输出每个操作执行后剩余黑色点的个数。 输入描述 Input Description 输入一行为N和M。 阅读全文
posted @ 2018-03-14 21:35 冥想选手 阅读(140) 评论(0) 推荐(0) 编辑
摘要:题目描述 Description 给你N个数,有两种操作: 1:给区间[a,b]的所有数增加X 2:询问区间[a,b]的数的和。 题目描述 Description 给你N个数,有两种操作: 1:给区间[a,b]的所有数增加X 2:询问区间[a,b]的数的和。 给你N个数,有两种操作: 1:给区间[a 阅读全文
posted @ 2018-03-13 22:18 冥想选手 阅读(144) 评论(0) 推荐(0) 编辑
摘要:【Tyvj1038】忠诚 线段树 题目描述 老管家是一个聪明能干的人。他为财主工作了整整10年,财主为了让自已账目更加清楚。要求管家每天记k次账,由于管家聪明能干,因而管家总是让财主十分满意。但是由于一些人的挑拨,财主还是对管家产生了怀疑。于是他决定用一种特别的方法来判断管家的忠诚,他把每次的账目按 阅读全文
posted @ 2018-03-13 21:11 冥想选手 阅读(133) 评论(0) 推荐(0) 编辑
摘要:C. Pythagorean Triples time limit per test 1 second memory limit per test 256 megabytes input standard input output standard output C. Pythagorean Tri 阅读全文
posted @ 2018-03-13 20:24 冥想选手 阅读(218) 评论(0) 推荐(0) 编辑
摘要:C. Journey time limit per test 3 seconds memory limit per test 256 megabytes input standard input output standard output C. Journey time limit per tes 阅读全文
posted @ 2018-03-12 20:58 冥想选手 阅读(238) 评论(0) 推荐(0) 编辑
摘要:并查集写法: 阅读全文
posted @ 2018-03-09 16:32 冥想选手 阅读(268) 评论(0) 推荐(0) 编辑
摘要:思路: 分别存下每个字符串的首尾字符,以字符为结点,单词看作一条变,就变成了求欧拉回路了,先判断下图是否连通,然后根据欧拉回路的结论:最多只能有两个点的入读不等于初读,而且必须是一个点的出度恰好比入度大1(将它作为起点),另一个的入度比出度大1(将它作为终点); 实现代码: 阅读全文
posted @ 2018-03-08 21:17 冥想选手 阅读(147) 评论(0) 推荐(0) 编辑
摘要:John has n tasks to do. Unfortunately, the tasks are not independent and the execution of one task is only possible if other tasks have already been e 阅读全文
posted @ 2018-03-07 22:02 冥想选手 阅读(159) 评论(0) 推荐(0) 编辑
摘要:The GeoSurvComp geologic survey company is responsible for detecting underground oil deposits. GeoSurvComp works with one large rectangular region of 阅读全文
posted @ 2018-03-06 21:04 冥想选手 阅读(156) 评论(0) 推荐(0) 编辑

点击右上角即可分享
微信分享提示