摘要: 题目描述 石头剪刀布是常见的猜拳游戏:石头胜剪刀,剪刀胜布,布胜石头。如果两个人出拳一样,则不分胜负。在《生活大爆炸》第二季第8 集中出现了一种石头剪刀布的升级版游戏。 升级版游戏在传统的石头剪刀布游戏的基础上,增加了两个新手势: 斯波克:《星际迷航》主角之一。 蜥蜴人:《星际迷航》中的反面角色。... 阅读全文
posted @ 2016-05-02 16:46 SBSOI 阅读(273) 评论(0) 推荐(0)
摘要: 题目描述 给一nXn的字母方阵,内可能蕴含多个“yizhong”单词。单词在方阵中是沿着同一方向连续摆放的。摆放可沿着8个方向的任一方向,同一单词摆放时不再改变方向,单词与单词之间[color=red]可以[/color]交叉,因此有可能共用字母。输出时,将不是单词的字母用“*”代替,以突... 阅读全文
posted @ 2016-05-02 16:46 SBSOI 阅读(137) 评论(0) 推荐(0)
摘要: 本题地址http://www.luogu.org/problem/show?pid=1525 关押罪犯 题目描述 S 城现有两座监狱,一共关押着N 名罪犯,编号分别为1~N。他们之间的关系自然也极不和谐。很多罪犯之间甚至积怨已久,如果客观条件具备则随时可能爆发冲突。我们用“怨气值”(一个正整数值)... 阅读全文
posted @ 2016-05-02 16:46 SBSOI 阅读(154) 评论(0) 推荐(0)
摘要: 题目背景 迷宫 【问题描述】 给定一个N*M方格的迷宫,迷宫里有T处障碍,障碍处不可通过。给定起点坐标和 终点坐标,问: 每个方格最多经过1次,有多少种从起点坐标到终点坐标的方案。在迷宫 中移动有上下左右四种方式,每次只能移动一个方格。数据保证起点上没有障碍。 输入样例 输出样例 【数据规... 阅读全文
posted @ 2016-05-02 16:46 SBSOI 阅读(218) 评论(0) 推荐(0)
摘要: 题目背景 一年一次的夏令营又要开始了,卡卡西和小伙伴们早就做好了准备,满心期 待着这趟快乐之旅。在一个阳光明媚的清晨,卡卡西在老师的带领下来到了这次 夏令营的首站——“神奇木材加工厂” 。 题目描述 这个木材加工厂比较特别,工人们只制 作圆形和长方形样式的木板, 工厂的测量工人每天需要计算每块成品... 阅读全文
posted @ 2016-05-02 16:46 SBSOI 阅读(287) 评论(0) 推荐(0)
摘要: 三国游戏 题目内容不放了 由于电脑总是会拆掉最大的组合,所以玩家最多只能得到数值第二大的组合 那么找出第二大的组合就行了 1 #include 2 #include 3 #include 4 #include 5 using namespace std; 6 int d[510][5... 阅读全文
posted @ 2016-05-02 16:46 SBSOI 阅读(271) 评论(0) 推荐(0)
摘要: 啊啊啊啊啊啊今天已经星期三了吗 那么,来一波题解吧 本题地址http://www.luogu.org/problem/show?pid=1006 传纸条 题目描述 小渊和小轩是好朋友也是同班同学,他们在一起总有谈不完的话题。一次素质拓展活动中,班上同学安排做成一个m行n列的矩阵,而小渊和小轩被安排... 阅读全文
posted @ 2016-05-02 16:46 SBSOI 阅读(202) 评论(0) 推荐(0)
摘要: 题目描述 小涵很喜欢电脑游戏,这些天他正在玩一个叫做《三国》的游戏。 在游戏中,小涵和计算机各执一方,组建各自的军队进行对战。游戏中共有 N 位武将(N为偶数且不小于 4),任意两个武将之间有一个“默契值”,表示若此两位武将作为一对组合作战时,该组合的威力有多大。游戏开始前,所有武将都是自由的(称... 阅读全文
posted @ 2016-05-02 16:46 SBSOI 阅读(142) 评论(0) 推荐(0)
摘要: 用这种方法声明头文件只需两行代码 #include using namespace std;这个头文件包含以下等等C++中包含的所有头文件: #include #include #include #include #include #include #include #inclu... 阅读全文
posted @ 2016-05-02 16:46 SBSOI 阅读(492) 评论(0) 推荐(0)
摘要: 题目描述 学校里有一个水房,水房里一共装有 m 个龙头可供同学们打开水,每个龙头每秒钟的 供水量相等,均为 1。 现在有 n 名同学准备接水,他们的初始接水顺序已经确定。将这些同学按接水顺序从 1到 n 编号,i 号同学的接水量为 wi。接水开始时,1 到 m 号同学各占一个水龙头,并同时打开水龙... 阅读全文
posted @ 2016-05-02 16:45 SBSOI 阅读(213) 评论(0) 推荐(0)
摘要: 题目描述 小T 是一名质量监督员,最近负责检验一批矿产的质量。这批矿产共有 n 个矿石,从 1到n 逐一编号,每个矿石都有自己的重量 wi 以及价值vi 。检验矿产的流程是: 1 、给定m 个区间[Li,Ri]; 2 、选出一个参数 W; 3 、对于一个区间[Li,Ri],计算矿石在这个区间上的检... 阅读全文
posted @ 2016-05-02 16:45 SBSOI 阅读(204) 评论(0) 推荐(0)
摘要: 题目描述 小涵很喜欢电脑游戏,这些天他正在玩一个叫做《三国》的游戏。 在游戏中,小涵和计算机各执一方,组建各自的军队进行对战。游戏中共有 N 位武将(N为偶数且不小于 4),任意两个武将之间有一个“默契值”,表示若此两位武将作为一对组合作战时,该组合的威力有多大。游戏开始前,所有武将都是自由的(称... 阅读全文
posted @ 2016-05-02 16:45 SBSOI 阅读(317) 评论(0) 推荐(0)
摘要: (洛谷P1525) 题目描述 S 城现有两座监狱,一共关押着N 名罪犯,编号分别为1~N。他们之间的关系自然也极不和谐。很多罪犯之间甚至积怨已久,如果客观条件具备则随时可能爆发冲突。我们用“怨气值”(一个正整数值)来表示某两名罪犯之间的仇恨程度,怨气值越大,则这两名罪犯之间的积怨越多。如果两名怨气... 阅读全文
posted @ 2016-05-02 16:45 SBSOI 阅读(223) 评论(0) 推荐(0)
摘要: After the last war devastated your country, you - as the king of the land of Ardenia - decided it washigh time to improve the defense of your capital... 阅读全文
posted @ 2016-05-02 16:45 SBSOI 阅读(127) 评论(0) 推荐(0)
摘要: Emily the entrepreneur has a cool business idea: packaging and selling snowakes. She has devised amachine that captures snowakes as they fall, and se... 阅读全文
posted @ 2016-05-02 16:45 SBSOI 阅读(123) 评论(0) 推荐(0)
摘要: 题目描述 Hanks 博士是 BT (Bio-Tech,生物技术) 领域的知名专家。现在,他正在为一个细胞实 验做准备工作:培养细胞样本。 Hanks 博士手里现在有 N 种细胞,编号从 1~N,一个第 i 种细胞经过 1 秒钟可以分裂为 Si个同种细胞(Si为正整数)。现在他需要选取某种细胞的一... 阅读全文
posted @ 2016-05-02 16:45 SBSOI 阅读(296) 评论(0) 推荐(1)
摘要: 题目描述 小渊和小轩是好朋友也是同班同学,他们在一起总有谈不完的话题。一次素质拓展活动中,班上同学安排做成一个m行n列的矩阵,而小渊和小轩被安排在矩阵对角线的两端,因此,他们就无法直接交谈了。幸运的是,他们可以通过传纸条来进行交流。纸条要经由许多同学传到对方手里,小渊坐在矩阵的左上角,坐标(1,1... 阅读全文
posted @ 2016-05-02 16:45 SBSOI 阅读(162) 评论(0) 推荐(0)
摘要: (又是昨天的作业……本题写于昨天) (这破题都做这么久,我是不是吃枣药丸……) (好吧这是一道图论题呢) 本题地址: http://www.luogu.org/problem/show?pid=2296 题目描述 在有向图G 中,每条边的长度均为1 ,现给定起点和终点,请你在图中找一条从起点到终点... 阅读全文
posted @ 2016-05-02 16:45 SBSOI 阅读(212) 评论(0) 推荐(0)
摘要: You are given a string consisting of parentheses () and []. A string of this type is said to be correct: (a)if it is the empty string(b)if A and B ar... 阅读全文
posted @ 2016-05-02 16:45 SBSOI 阅读(189) 评论(0) 推荐(0)
摘要: A quadtree is a representation format used to encode images. The fundamental idea behind the quadtree is that any image can be split into four quadra... 阅读全文
posted @ 2016-05-02 16:45 SBSOI 阅读(107) 评论(0) 推荐(0)
摘要: 1 /**/ 2 #include 3 #include 4 #include 5 #include 6 #include 7 using namespace std; 8 int head=0,tail=0; 9 int t[2000]={0}; 10 int x,c=0; 1... 阅读全文
posted @ 2016-05-02 16:45 SBSOI 阅读(169) 评论(0) 推荐(0)
摘要: 题目背景 小明过生日的时候,爸爸送给他一副乌龟棋当作礼物。 题目描述 乌龟棋的棋盘是一行N个格子,每个格子上一个分数(非负整数)。棋盘第1格是唯一的起点,第N格是终点,游戏要求玩家控制一个乌龟棋子从起点出发走到终点。 乌龟棋中M张爬行卡片,分成4种不同的类型(M张卡片中不一定包含所有4种类型的卡片... 阅读全文
posted @ 2016-05-02 16:45 SBSOI 阅读(140) 评论(0) 推荐(0)
摘要: 题目背景 小晨的电脑上安装了一个机器翻译软件,他经常用这个软件来翻译英语文章。 题目描述 这个翻译软件的原理很简单,它只是从头到尾,依次将每个英文单词用对应的中文含义来替换。对于每个英文单词,软件会先在内存中查找这个单词的中文含义,如果内存中有,软件就会用它进行翻译;如果内存中没有,软件就会在外存... 阅读全文
posted @ 2016-05-02 16:45 SBSOI 阅读(195) 评论(0) 推荐(0)
摘要: 1 #include 2 #include 3 #include 4 #include 5 using namespace std; 6 int d[510][510]; 7 int n; 8 int fst,snd,ans; 9 int main(){ 10 scanf... 阅读全文
posted @ 2016-05-02 16:45 SBSOI 阅读(281) 评论(0) 推荐(0)
摘要: 题目描述 Tom最近在研究一个有趣的排序问题。如图所示,通过2个栈S1和S2,Tom希望借助以下4种操作实现将输入序列升序排序。 操作a 如果输入序列不为空,将第一个元素压入栈S1 操作b 如果栈S1不为空,将S1栈顶元素弹出至输出序列 操作c 如果输入序列不为空,将第一个元素压入栈S2 操作d... 阅读全文
posted @ 2016-05-02 16:45 SBSOI 阅读(139) 评论(0) 推荐(0)
摘要: 题目描述 Hanks 博士是 BT (Bio-Tech,生物技术) 领域的知名专家。现在,他正在为一个细胞实 验做准备工作:培养细胞样本。 Hanks 博士手里现在有 N 种细胞,编号从 1~N,一个第 i 种细胞经过 1 秒钟可以分裂为 Si个同种细胞(Si为正整数)。现在他需要选取某种细胞的一... 阅读全文
posted @ 2016-05-02 16:45 SBSOI 阅读(163) 评论(0) 推荐(0)
摘要: Yup!! The problem name reects your task; just add a set of numbers. But you may feel yourselvescondescended, to write a C/C++ program just to add a s... 阅读全文
posted @ 2016-05-02 16:45 SBSOI 阅读(150) 评论(0) 推荐(0)
摘要: Before the invention of book-printing, it was very hard to make a copy of a book. All the contents hadto be re-written by hand by so called scribers.... 阅读全文
posted @ 2016-05-02 16:45 SBSOI 阅读(164) 评论(0) 推荐(0)
摘要: (第一次写题解,随意喷) (只是前一天的作业哈) (先凑个数) 题目描述 上体育课的时候,小蛮的老师经常带着同学们一起做游戏。这次,老师带着同学们一起做传球游戏。游戏规则是这样的:n个同学站成一个圆圈,其中的一个同学手里拿着一个球,当老师吹哨子时开始传球,每个同学可以把球传给自己左右的两个同学中的... 阅读全文
posted @ 2016-05-02 16:44 SBSOI 阅读(192) 评论(0) 推荐(0)
摘要: 题目描述 上体育课的时候,小蛮的老师经常带着同学们一起做游戏。这次,老师带着同学们一起做传球游戏。 游戏规则是这样的:n个同学站成一个圆圈,其中的一个同学手里拿着一个球,当老师吹哨子时开始传球,每个同学可以把球传给自己左右的两个同学中的一个(左右任意),当老师在此吹哨子时,传球停止,此时,拿着球没... 阅读全文
posted @ 2016-05-02 16:44 SBSOI 阅读(226) 评论(0) 推荐(0)
摘要: 题目描述 小渊是个聪明的孩子,他经常会给周围的小朋友们将写自己认为有趣的内容。最近,他准备给小朋友们讲解立体图,请你帮他画出立体图。 小渊有一块面积为m*n的矩形区域,上面有m*n个边长为1的格子,每个格子上堆了一些同样大小的积木(积木的长宽高都是1),小渊想请你打印出这些格子的立体图。我们定义每... 阅读全文
posted @ 2016-05-02 16:44 SBSOI 阅读(254) 评论(0) 推荐(0)
摘要: (啊啊啊终于补到了今天的作业了) 本题地址: http://www.luogu.org/problem/show?pid=1058 题目描述 小渊是个聪明的孩子,他经常会给周围的小朋友们将写自己认为有趣的内容。最近,他准备给小朋友们讲解立体图,请你帮他画出立体图。小渊有一块面积为m*n的矩形区域,... 阅读全文
posted @ 2016-05-02 16:44 SBSOI 阅读(368) 评论(0) 推荐(0)
摘要: 给出一个n(n #include #include using namespace std; int n; void cheng (int a[2][2],int b[2][2]) { int c[2][2]; memset(c,0,sizeof(c)); for (i... 阅读全文
posted @ 2016-05-02 16:44 SBSOI 阅读(171) 评论(0) 推荐(0)
摘要: T1 ISBN号码 题目描述 每一本正式出版的图书都有一个ISBN号码与之对应,ISBN码包括9位数字、1位识别码和3位分隔符, 其规定格式如“x-xxx-xxxxx-x”,其中符号“-”就是分隔符(键盘上的减号),最后一位是识别码,例如0-670-82162-4就是一个标 准的ISBN码。IS... 阅读全文
posted @ 2016-05-02 16:44 SBSOI 阅读(240) 评论(0) 推荐(0)
摘要: 题目描述 上体育课的时候,小蛮的老师经常带着同学们一起做游戏。这次,老师带着同学们一起做传球游戏。 游戏规则是这样的:n个同学站成一个圆圈,其中的一个同学手里拿着一个球,当老师吹哨子时开始传球,每个同学可以把球传给自己左右的两个同学中的一个(左右任意),当老师在此吹哨子时,传球停止,此时,拿着球没... 阅读全文
posted @ 2016-05-02 16:44 SBSOI 阅读(200) 评论(0) 推荐(0)
摘要: Before being an ubiquous communications gadget, a mobilewas just a structure made of strings and wires suspendingcolourfull things. This kind of mobi... 阅读全文
posted @ 2016-05-02 16:44 SBSOI 阅读(152) 评论(0) 推荐(0)
摘要: We would like to place n rooks, 1  n  5000, on a n  nboard subject to the following restrictions• The i-th rook can only be placed within the rect... 阅读全文
posted @ 2016-05-02 16:44 SBSOI 阅读(147) 评论(0) 推荐(0)
摘要: 题目描述 每一本正式出版的图书都有一个ISBN号码与之对应,ISBN码包括9位数字、1位识别码和3位分隔符,其规定格式如“x-xxx-xxxxx-x”,其中符号“-”就是分隔符(键盘上的减号),最后一位是识别码,例如0-670-82162-4就是一个标准的ISBN码。ISBN码的首位数字表示书籍的... 阅读全文
posted @ 2016-05-02 16:44 SBSOI 阅读(344) 评论(0) 推荐(0)
摘要: 题目描述 给你n根火柴棍,你可以拼出多少个形如“A+B=C”的等式?等式中的A、B、C是用火柴棍拼出的整数(若该数非零,则最高位不能是0)。用火柴棍拼数字0-9的拼法如图所示: 注意: 加号与等号各自需要两根火柴棍 如果A≠B,则A+B=C与B+A=C视为不同的等式(A、B、C>=0) ... 阅读全文
posted @ 2016-05-02 16:44 SBSOI 阅读(327) 评论(0) 推荐(0)
摘要: 题目描述 上课的时候总会有一些同学和前后左右的人交头接耳,这是令小学班主任十分头疼的一件事情。不过,班主任小雪发现了一些有趣的现象,当同学们的座次确定下来之后,只有有限的D对同学上课时会交头接耳。同学们在教室中坐成了M行N列,坐在第i行第j列的同学的位置是(i,j),为了方便同学们进出,在教室中设... 阅读全文
posted @ 2016-05-02 16:44 SBSOI 阅读(261) 评论(0) 推荐(0)
摘要: Shanghai Hypercomputers, the world's largest computer chip manufacturer, has invented a new classof nanoparticles called Amphiphilic Carbon Molecules... 阅读全文
posted @ 2016-05-02 16:44 SBSOI 阅读(375) 评论(0) 推荐(0)
摘要: As you may know from the comic \Asterix and the Chieftain's Shield", Gergovia consists of one street,and every inhabitant of the city is a wine sales... 阅读全文
posted @ 2016-05-02 16:44 SBSOI 阅读(144) 评论(0) 推荐(0)
摘要: 此处为前三题,第四题将单独发布 火柴棒等式 题目描述 给你n根火柴棍,你可以拼出多少个形如“A+B=C”的等式?等式中的A、B、C是用火柴棍拼出的整数(若该数非零,则最高位不能是0)。用火柴棍拼数字0-9的拼法如图所示: 注意: 加号与等号各自需要两根火柴棍 如果A≠B,则A+... 阅读全文
posted @ 2016-05-02 16:44 SBSOI 阅读(196) 评论(0) 推荐(0)
摘要: The SUM problem can be formulated as follows: given four lists A;B;C;D of integer values, computehow many quadruplet (a; b; c; d) 2 AB C D are suc... 阅读全文
posted @ 2016-05-02 16:44 SBSOI 阅读(128) 评论(0) 推荐(0)
摘要: The United Nations has decided to build a new headquarters in Saint Petersburg, Russia. It will have aform of a rectangular parallelepiped and will c... 阅读全文
posted @ 2016-05-02 16:44 SBSOI 阅读(133) 评论(0) 推荐(0)
摘要: Stacks of Flapjacks Background Stacks and Queues are often considered the bread and butter of data structures and find use in architecture... 阅读全文
posted @ 2016-05-02 16:44 SBSOI 阅读(175) 评论(0) 推荐(0)
摘要: The Dole Queue In a serious attempt to downsize (reduce) the dole queue, The New National Green Labour Rhinoceros Party has decided on the fo... 阅读全文
posted @ 2016-05-02 16:44 SBSOI 阅读(164) 评论(0) 推荐(0)
摘要: 1 #include 2 int a[30010],b[30010]; 3 int main() 4 { 5 int i,j,k,l,m,n,x,y,z; 6 while (scanf("%d",&k)==1) 7 { 8 n=0; 9... 阅读全文
posted @ 2016-05-02 16:43 SBSOI 阅读(120) 评论(0) 推荐(0)
摘要: 1 #include 2 int a[20]; 3 int main() 4 { 5 int i,j,k,m,n,p,t,q,y,z; 6 long long ans,x; 7 t=0; 8 while (scanf("%d",&n)==1) ... 阅读全文
posted @ 2016-05-02 16:43 SBSOI 阅读(84) 评论(0) 推荐(0)
摘要: 1 #include 2 #include 3 #include 4 bool b; 5 bool ok(int x,int y) 6 { 7 int p,q,i; 8 if (x=100000) break; 39 if (ok(x,y... 阅读全文
posted @ 2016-05-02 16:43 SBSOI 阅读(196) 评论(0) 推荐(0)
摘要: 1 #include 2 #include 3 #include 4 struct circ 5 { 6 double x,y,r; 7 }a[1010]; 8 bool vis[1010]; 9 int n; 10 double ans_l,ans_r; 11 do... 阅读全文
posted @ 2016-05-02 16:43 SBSOI 阅读(125) 评论(0) 推荐(0)
摘要: 1 #include 2 #include 3 #include 4 #include 5 using namespace std; 6 queue q1,q2; 7 stack s; 8 int first[100010],next[400010],to[400010],d... 阅读全文
posted @ 2016-05-02 16:43 SBSOI 阅读(100) 评论(0) 推荐(0)
摘要: 1 #include 2 #include 3 #include 4 using namespace std; 5 int map[60][60],cnt[60]; 6 queue q; 7 char s[10]; 8 int main() 9 { 10 int i,... 阅读全文
posted @ 2016-05-02 16:43 SBSOI 阅读(156) 评论(0) 推荐(0)
摘要: Prime Ring Problem A ring is composed of n (even number) circles as shown in diagram. Put natural numbers into each circle separately, and... 阅读全文
posted @ 2016-05-02 16:43 SBSOI 阅读(144) 评论(0) 推荐(0)
摘要: Krypton Factor You have been employed by the organisers of a Super Krypton Factor Contest in which contestants have very high mental and phy... 阅读全文
posted @ 2016-05-02 16:43 SBSOI 阅读(107) 评论(0) 推荐(0)
摘要: Bandwidth Given a graph (V,E) where V is a set of nodes and E is a set of arcs in VxV, and an ordering on the elements in V, then the bandwid... 阅读全文
posted @ 2016-05-02 16:43 SBSOI 阅读(176) 评论(0) 推荐(0)
摘要: quicksum Given a string of digits, find the minimum number of additions required for the string to equal some target number. Each addition is the equ... 阅读全文
posted @ 2016-05-02 16:43 SBSOI 阅读(147) 评论(0) 推荐(0)
摘要: 然而等于是默了一遍标程 1 #include 2 #include 3 #include 4 #include 5 #include 6 using namespace std; 7 int n; 8 bool bal(int &w){ 9 int w1,w2,d1,d... 阅读全文
posted @ 2016-05-02 16:43 SBSOI 阅读(89) 评论(0) 推荐(0)
摘要: 1 /*UVa 11292 Dragon of Loowater*/ 2 #include 3 #include 4 #include 5 #include 6 using namespace std; 7 int n,m; 8 int main(){ 9 while(s... 阅读全文
posted @ 2016-05-02 16:43 SBSOI 阅读(96) 评论(0) 推荐(0)
摘要: 1 #include 2 #include 3 #include 4 struct node 5 { 6 int fat,lson,rson; 7 double wei; 8 }tree[500]; 9 double w[10],lim,ans; 10 int... 阅读全文
posted @ 2016-05-02 16:43 SBSOI 阅读(128) 评论(0) 推荐(0)
摘要: T1 计数问题 题目描述 试计算在区间 1 到 n 的所有整数中,数字 x(0 ≤ x ≤ 9)共出现了多少次?例如,在 1 到 11 中,即在 1、2、3、4、5、6、7、8、9、10、11 中,数字 1 出现了 4 次。 输入输出格式 输入格式: 输入文件名为 count.in。 输入共 ... 阅读全文
posted @ 2016-05-02 16:43 SBSOI 阅读(326) 评论(0) 推荐(0)
摘要: T1 生活大爆炸版石头剪刀布 题目描述 石头剪刀布是常见的猜拳游戏:石头胜剪刀,剪刀胜布,布胜石头。如果两个人出拳一样,则不分胜负。在《生活大爆炸》第二季第8 集中出现了一种石头剪刀布的升级版游戏。 升级版游戏在传统的石头剪刀布游戏的基础上,增加了两个新手势: 斯波克:《星际迷航》主角之一。 ... 阅读全文
posted @ 2016-05-02 16:43 SBSOI 阅读(116) 评论(0) 推荐(0)
摘要: quicksum Queation: Given a string of digits, find the minimum number of additions required for the string to equal some target number. Each addition ... 阅读全文
posted @ 2016-05-02 16:43 SBSOI 阅读(181) 评论(0) 推荐(0)
摘要: A common typing error is to place the hands on the keyboard one row to the right of the correct position. So ‘Q’ is typed as ‘W’ and ‘J’ is typed as ... 阅读全文
posted @ 2016-05-02 16:43 SBSOI 阅读(159) 评论(0) 推荐(0)
摘要: Quadtrees A quadtree is a representation format used to encode images. The fundamental idea behind the quadtree is that any image can be spli... 阅读全文
posted @ 2016-05-02 16:42 SBSOI 阅读(140) 评论(0) 推荐(0)
摘要: Oil Deposits The GeoSurvComp geologic survey company is responsible for detecting underground oil deposits. GeoSurvComp works with one large... 阅读全文
posted @ 2016-05-02 16:42 SBSOI 阅读(127) 评论(0) 推荐(0)
摘要: 看完题目的长度以后应该就知道这题有多变态了。。。 接下来你将看到代码的长度。。。 1 #include 2 #include 3 #include 4 #include 5 using namespace std; 6 struct node 7 { 8 ... 阅读全文
posted @ 2016-05-02 16:42 SBSOI 阅读(121) 评论(0) 推荐(0)
摘要: 1 #include 2 #include 3 #include 4 using namespace std; 5 int first[110],next[10010],to[10010],n; 6 bool b[110]; 7 stack sta; 8 void dfs(i... 阅读全文
posted @ 2016-05-02 16:42 SBSOI 阅读(192) 评论(0) 推荐(0)
摘要: 把每个字母看成一个结点,每个单词看成一条从第一个字母到最后一个字母的有向边。把这些单词首尾相接相当于寻找欧拉路径(一笔画)。 则其需满足两个条件:1.忽略边的方向后,原图联通。2.一个点的入度比出度大1,另一个点入度比出度小1,其他点入度和出度相等。 1 #include 2 #incl... 阅读全文
posted @ 2016-05-02 16:42 SBSOI 阅读(172) 评论(0) 推荐(0)
摘要: 无需建树,递归即可。 为什么说是烂题呢? 1.pdf里的样例数据复制过来丢了空格,导致我调了很久都没有发现问题在哪。 2.如样例2所示,4个'-'下面却少一格。 3.空树,即只有'#'需要特殊处理。 1 #include 2 #include 3 #include 4 #includ... 阅读全文
posted @ 2016-05-02 16:42 SBSOI 阅读(131) 评论(0) 推荐(0)
摘要: 计算(calc.cpp) 【问题描述】 小明在你的帮助下,破密了Ferrari设的密码门,正要往前走,突然又出现了一个密码门,门上有一个算式,其中只有“(”,“)”,“0-9”,“+”,“-”,“*”,“/”,“^”求出的值就是密码。小明数学学得不好,还需你帮他的忙。(“/”用整数除法) 【输入】... 阅读全文
posted @ 2016-05-02 16:42 SBSOI 阅读(253) 评论(0) 推荐(0)
摘要: 本章施工仍未完成 现在的时间是3.17 0:28,我困得要死 本来今天(昨天?)晚上的计划是把整个四道题的题解写出来,但是到现在还没写完T4的高效算法,简直悲伤。 尝试了用floyd写T4,终于大功告成AC后,看到别人的解题报告说fl能过只是因为测试数据范围小。 好像主要有三种解法,fl,di... 阅读全文
posted @ 2016-05-02 16:42 SBSOI 阅读(169) 评论(0) 推荐(0)
摘要: 洛谷P1093 题目描述 某小学最近得到了一笔赞助,打算拿出其中一部分为学习成绩优秀的前5名学生发奖学金。期末,每个学生都有3门课的成绩:语文、数学、英语。先按总分从高到低排序,如果两个同学总分相同,再按语文成绩从高到低排序,如果两个同学总分和语文成绩都相同,那么规定学号小的同学 排在前面,这... 阅读全文
posted @ 2016-05-02 16:42 SBSOI 阅读(497) 评论(0) 推荐(0)
摘要: #include #include #include #include #include using namespace std; int ss,n,d[10001],sum=0; int main() { int i,y; bool c=false; c... 阅读全文
posted @ 2016-05-02 16:42 SBSOI 阅读(173) 评论(0) 推荐(0)
摘要: 1 #include 2 #include 3 #include 4 #include 5 #include 6 using namespace std; 7 int a[110][110][110],x_map[110],y_map[110],z_map[110... 阅读全文
posted @ 2016-05-02 16:42 SBSOI 阅读(87) 评论(0) 推荐(0)
摘要: OJ地址:洛谷P1981 CODEVS 3292 正常写法是用栈 1 #include 2 #include 3 #include 4 #include 5 #include 6 #include 7 using namespace std; 8 char c[200000... 阅读全文
posted @ 2016-05-02 16:42 SBSOI 阅读(459) 评论(0) 推荐(0)
摘要: 因为复制过来排版很乱,所以上截图。 1 #include 2 #include 3 int sum[10010]; 4 void bd(int p) 5 { 6 int x; 7 scanf("%d",&x); 8 if (x==-1) return; ... 阅读全文
posted @ 2016-05-02 16:42 SBSOI 阅读(125) 评论(0) 推荐(0)
摘要: 1 #include 2 #include 3 #include 4 #include 5 #include 6 #include 7 using namespace std; 8 int k,num[101],key[101],test[101]; ... 阅读全文
posted @ 2016-05-02 16:42 SBSOI 阅读(190) 评论(0) 推荐(0)
摘要: Not so Mobile Before being an ubiquous communications gadget, a mobile was just a structure made of strings and wires suspending colourfull things. ... 阅读全文
posted @ 2016-05-02 16:42 SBSOI 阅读(115) 评论(0) 推荐(0)
摘要: You are to determine the value of the leaf node in a given binary tree that is the terminal node of a path of least value from the root of the binary... 阅读全文
posted @ 2016-05-02 16:42 SBSOI 阅读(136) 评论(0) 推荐(0)
摘要: 题目如下:Given a sequence of binary trees, you are to write a program that prints a level-order traversal of each tree. In this problem each node of a bi... 阅读全文
posted @ 2016-05-02 16:42 SBSOI 阅读(124) 评论(0) 推荐(0)
摘要: 描述 9月21日,今天是pink的生日,飘飘乎居士当然要去别人的领土大闹一番啦! 为了收集更多的能量到pink家大闹,飘飘乎居士准备从后花园中取出自己多年积攒的p个能量块。后花园一共被划分n个地区,能量块被分散在里面,现在飘飘乎居士拿出地图,发现自己站在1的地方,而他要做的就是用最短的... 阅读全文
posted @ 2016-05-02 16:42 SBSOI 阅读(205) 评论(0) 推荐(0)
摘要: 1644 免费馅饼(巴蜀oj上的编号) 题面: SERKOI最新推出了一种叫做“免费馅饼”的游戏。 游戏在一个舞台上进行。舞台的宽度为W格,天幕的高度为H格,游戏者占一格。开始时,游戏者站在舞台的正中央,手里拿着一个托盘。 ... 阅读全文
posted @ 2016-05-02 16:41 SBSOI 阅读(339) 评论(0) 推荐(0)
摘要: #include #include #include int begin_prime(int a){ memset(prime,1,sizeof(prime)); memset(primes,0,sizeof(primes)); int num=0; for(int... 阅读全文
posted @ 2016-05-02 16:41 SBSOI 阅读(153) 评论(0) 推荐(0)
摘要: #include #include #include #include #include #include #include using namespace std; #define WIDE_AND_LONG 20 #define NAME_LEN 20 typedef cla... 阅读全文
posted @ 2016-05-02 16:41 SBSOI 阅读(145) 评论(0) 推荐(0)
摘要: 1 /*Hello World*/ 2 #include 3 #include 4 #include 5 using namespace std; 6 int a,m,n; 7 int mx[5]={0,-1,0,1,0}; 8 int my[5]={0,0,1,0,-1}; 9... 阅读全文
posted @ 2016-05-02 16:41 SBSOI 阅读(170) 评论(0) 推荐(0)