- 博客(8)
- 收藏
- 关注
原创 Ubuntu启动时出现Started Hold until boot procss finishes up的解决方法
原因是磁盘空间不足。解决方法是在grub引导时进入recovery,然后选择clean。退出recovery的方法是ctrl+x, ctrl+alt+del重启。
2020-10-11 09:10:58
6373
1
原创 apt阿里源
deb http://mirrors.aliyun.com/ubuntu/ bionic main restricted universe multiversedeb http://mirrors.aliyun.com/ubuntu/ bionic-security main restricted universe multiversedeb http://mirrors.aliyun.com/ubuntu/ bionic-updates main restricted universe multive
2020-06-07 21:53:00
242
原创 如何只用顺序结构实现三个数字排序
RT,如何在不用循环、不用判断、不用三目运算符的条件下,实现三个数字的排序?代码如下#include <iostream>#include <cstdio>using namespace std;int main(){ int a,b,c; scanf("%d %d %d",&a,&b,&c); int d=a*(a<b)+b...
2018-12-28 10:42:10
533
原创 HDOJ-2612-Find A Way(BFS)
这是一道稍微有点特殊的题,特殊之处在于它需要使用2次广搜。刚开始做的时候思路是把所有肯德基的位置记录下来,然后以每一个肯德基的位置为终点来bfs。。。。。。然后就TLE了OTZ。。。。。。后来发现只需要只需要用两次bfs,把整个地图走遍,如果走到的地方是肯德基,就记录此时的步数,然后两个最小值相加乘以11就行了。代码如下:#include <iostream>#includ...
2018-12-21 22:38:01
162
原创 POJ1328-Radar Installation(贪心)
POJ1328-Radar Installation(贪心)思路:以岛屿为圆心作半径为d的圆,则每个可以被覆盖的岛屿(即y&amp;amp;lt;=d)都可以在x轴上形成一个或两个交点。也就是说,每个岛屿在画圆后都在x轴上形成一个长度大于或等于0的区间。这些区间即为安装雷达的地方。接下来要做的就是将这些区间的相交区间(即交集)找出来并计数。相交区间的数目即为雷达的数目。#include &amp;amp;lt;iostrea...
2018-12-03 23:07:15
182
原创 POJ1182-食物链
POJ1182-食物链题目链接:1182-食物链代码如下:#include &lt;iostream&gt;#include &lt;algorithm&gt;#include &lt;cstdio&gt;int pre[50010];int rankrr[50010];const int maxn=50000;using namespace std;int findr(int...
2018-12-03 23:07:02
134
原创 POJ1002-A+B Problem
大数相加,方法就是用字符串存数字,然后模拟手算的方法计算。虽是水题,但有些细节还是要注意。代码如下:#include &lt;iostream&gt;#include &lt;cstdio&gt;#include &lt;algorithm&gt;#include &lt;cstring&gt;using namespace std;char a[1010],b[10
2018-12-03 23:06:41
169
原创 POJ2159-Ancient Cipher
POJ2159-Ancient Cipher题目链接:Ancient Cipher代码如下:#include &lt;iostream&gt;#include &lt;algorithm&gt;#include &lt;stdio.h&gt;#include &lt;string.h&gt;using namespace std;char ori[105];cha
2018-11-29 20:25:13
170
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人