随笔分类 -  OJ-UVA刷书计划

紫书+挑战+大白
摘要:【题意】:一个人要逃离迷宫,迷宫中有多处起火了。问能否逃出迷宫,能输出最小步数,不能输出"IMPOSSIBLE"。迷宫的 边缘 都是出口。 【分析】:双点BFS,火和人同时进行BFS即可。注意首先火源不只一处,可以有多处,那么我们就要把每处火都数组记录下来,然后bfs搜索前让火源全部入队,还有就是不 阅读全文
posted @ 2018-07-12 18:03 Roni_i 阅读(186) 评论(0) 推荐(0) 编辑
摘要:It’s commonly known that the Dutch have invented copper wire. Two Dutch men were fighting over a nickel, which was made of copper. They were both so e 阅读全文
posted @ 2018-05-16 16:37 Roni_i 阅读(423) 评论(0) 推荐(1) 编辑
摘要:【代码】: 【一维 + vis标记数组 + 倒序输出】:用一个vis[i][j]记录容量为j的背包里面有没有用到过i物品,物品是倒着放的。 #include<cstdio> #include<string> #include<cstdlib> #include<cmath> #include<ios 阅读全文
posted @ 2018-05-16 15:03 Roni_i 阅读(168) 评论(0) 推荐(0) 编辑
摘要:``` Secret agent Maria was sent to Algorithms City to carry out an especially dangerous mission. After several thrilling events we find her in the first station of Algorithms City Metro, examining the... 阅读全文
posted @ 2018-05-08 23:37 Roni_i 阅读(148) 评论(0) 推荐(0) 编辑
摘要:1.欧几里得算法和唯一分解定理 #include<iostream> #include<algorithm> #include<cstring> #include<cstdio> using namespace std; int a[1000005]; int GCD(int a,int b) { 阅读全文
posted @ 2018-04-07 00:54 Roni_i 阅读(139) 评论(0) 推荐(0) 编辑
摘要:3-2 开灯问题 #include <iostream> #include <cstdio> #include <cstdlib> #include <algorithm> #include <queue> #include <stack> #include <map> #include <cstr 阅读全文
posted @ 2018-04-02 13:26 Roni_i 阅读(135) 评论(0) 推荐(0) 编辑
摘要:https://vjudge.net/problem/UVA-272 【分析】:标记一下。 【代码】: 阅读全文
posted @ 2017-12-13 15:01 Roni_i 阅读(234) 评论(0) 推荐(0) 编辑
摘要:http://blog.csdn.net/c20182030/article/details/52327948 1388:Lake Counting 1388:Lake Counting 总时间限制: 1000ms 内存限制: 65536kB描述Due to recent rains, water 阅读全文
posted @ 2017-11-12 14:50 Roni_i 阅读(199) 评论(0) 推荐(0) 编辑
摘要:http://blog.csdn.net/u010470972/article/details/33415617 Description 输入一个n×n的黑白图像(1表示黑色,0表示白色),任务是统计其中八连块的个数。如果两个黑格子有公共边或者公共顶点,就说它们属于同一个八连块。如下图所示的图形有3 阅读全文
posted @ 2017-11-12 14:09 Roni_i 阅读(270) 评论(0) 推荐(0) 编辑
摘要:有一个形似央视大楼(Orz)的筒,从A口可以放球,放进去的球可通过挡板DE使其掉进B裤管或C裤管里,现有带1-10标号的球按给定顺序从A口放入,问是否有一种控制挡板的策略可以使B裤管和C裤管中的球从下往上标号递增。 输入: 第一行输入数据组数N。接下来N行为N组具体数据,每组数据中有10个整数,代表 阅读全文
posted @ 2017-10-16 15:11 Roni_i 阅读(206) 评论(0) 推荐(0) 编辑

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