「已注销」
码龄7年
关注
提问 私信
  • 博客:26,854
    26,854
    总访问量
  • 146
    原创
  • 暂无
    排名
  • 5
    粉丝
  • 0
    铁粉
IP属地以运营商信息为准,境内显示到省(区、市),境外显示到国家(地区)
IP 属地:北京市
  • 加入CSDN时间: 2017-10-20
博客简介:

ikunsaikou的博客

查看详细资料
个人成就
  • 获得17次点赞
  • 内容获得11次评论
  • 获得19次收藏
  • 代码片获得307次分享
创作历程
  • 2篇
    2021年
  • 114篇
    2020年
  • 25篇
    2019年
  • 5篇
    2018年
成就勋章
TA的专栏
  • PAT (Advanced Level)
    115篇
  • c++
    123篇
  • PAT
    121篇
  • 图床
    1篇
  • 图论
    2篇
  • DFS
    2篇
  • 汉密尔顿回路
    1篇
  • Dijkstra
    1篇
  • 优先队列
    1篇
  • 逆散列
    1篇
  • 二叉树
    2篇
  • 重建二叉树
    1篇
  • PAT Basic Level
    11篇
  • c
  • java
    4篇
  • 控制台
    2篇
  • C#
    2篇
  • Unity3D
    1篇
  • coroutines
    1篇
  • 最近
  • 文章
  • 代码仓
  • 资源
  • 问答
  • 帖子
  • 视频
  • 课程
  • 关注/订阅/互动
  • 收藏
搜TA的内容
搜索 取消

自用图床

原创
发布博客 2021.05.26 ·
186 阅读 ·
0 点赞 ·
0 评论 ·
0 收藏

自用算法模板整理

1.排序:快排#include <iostream>#include <vector>using namespace std;int partition(vector<int> &a, int l, int r) { int p = a[l]; while (l < r) { while (a[r] > p && l < r) r--; if (l < r) { a[l] = a[
原创
发布博客 2021.02.06 ·
223 阅读 ·
0 点赞 ·
0 评论 ·
0 收藏

进阶实验6-3.1 红色警报 (25分)

进阶实验6-3.1 红色警报 (25分)战争中保持各个城市间的连通性非常重要。本题要求你编写一个报警程序,当失去一个城市导致国家被分裂为多个无法连通的区域时,就发出红色警报。注意:若该国本来就不完全连通,是分裂的k个区域,而失去一个城市并不改变其他城市之间的连通性,则不要发出警报。输入格式:输入在第一行给出两个整数N(0<N≤500)和M(≤5000),分别为城市个数(于是默认城市从0到N-1编号)和连接两城市的通路条数。随后M行,每行给出一条通路所连接的两个城市的编号,其间以...
原创
发布博客 2020.08.20 ·
287 阅读 ·
0 点赞 ·
0 评论 ·
0 收藏

基础实验6-2.3 拯救007 (25分) [浙大版《数据结构学习与实验指导(第2版)》]

题目连接:基础实验6-2.3 拯救007 (25分)在老电影“007之生死关头”(Live and Let Die)中有一个情节,007被毒贩抓到一个鳄鱼池中心的小岛上,他用了一种极为大胆的方法逃脱 —— 直接踩着池子里一系列鳄鱼的大脑袋跳上岸去!(据说当年替身演员被最后一条鳄鱼咬住了脚,幸好穿的是特别加厚的靴子才逃过一劫。)设鳄鱼池是长宽为100米的方形,中心坐标为 (0, 0),且东北角坐标为 (50, 50)。池心岛是以 (0, 0) 为圆心、直径15米的圆。给定池中分布的鳄鱼的坐标、以及00
原创
发布博客 2020.08.17 ·
707 阅读 ·
0 点赞 ·
0 评论 ·
0 收藏

案例6-1.3 哥尼斯堡的“七桥问题” (25分) 浙大版《数据结构学习与实验指导(第2版)》

案例6-1.3 哥尼斯堡的“七桥问题” (25分)哥尼斯堡是位于普累格河上的一座城市,它包含两个岛屿及连接它们的七座桥,如下图所示。可否走过这样的七座桥,而且每桥只走过一次?瑞士数学家欧拉(Leonhard Euler,1707—1783)最终解决了这个问题,并由此创立了拓扑学。这个问题如今可以描述为判断欧拉回路是否存在的问题。欧拉回路是指不令笔离开纸面,可画过图中每条边仅一次,且可以回到起点的一条回路。现给定一个无向图,问是否存在欧拉回路?输入格式:输入第一行给出两个正整数,分别.
原创
发布博客 2020.08.14 ·
353 阅读 ·
0 点赞 ·
0 评论 ·
1 收藏

基础实验6-2.2 汉密尔顿回路 (25分) --浙大版《数据结构学习与实验指导(第2版)》

题目连接:基础实验6-2.2 汉密尔顿回路 (25分) 著名的“汉密尔顿(Hamilton)回路问题”是要找一个能遍历图中所有顶点的简单回路(即每个顶点只访问 1 次)。本题就要求你判断任一给定的回路是否汉密尔顿回路。输入格式:首先第一行给出两个正整数:无向图中顶点数N(2<N≤200)和边数M。随后M行,每行给出一条边的两个端点,格式为“顶点1 顶点2”,其中顶点从 1 到N编号。再下一行给出一个正整数K,是待检验的回路的条数。随后K行,每行给出一条待检回路,格式为:...
原创
发布博客 2020.08.13 ·
421 阅读 ·
0 点赞 ·
1 评论 ·
0 收藏

基础实验8-1.2 直捣黄龙 (30分) [浙大版《数据结构学习与实验指导(第2版)》题目集]

基础实验8-1.2 直捣黄龙 (30分)本题是一部战争大片 —— 你需要从己方大本营出发,一路攻城略地杀到敌方大本营。首先时间就是生命,所以你必须选择合适的路径,以最快的速度占领敌方大本营。当这样的路径不唯一时,要求选择可以沿途解放最多城镇的路径。若这样的路径也不唯一,则选择可以有效杀伤最多敌军的路径。输入格式:输入第一行给出2个正整数N(2≤N≤200,城镇总数)和K(城镇间道路条数),以及己方大本营和敌方大本营的代号。随后N-1行,每行给出除了己方大本营外的一个城镇的代号和驻守的敌军...
原创
发布博客 2020.08.12 ·
1340 阅读 ·
2 点赞 ·
0 评论 ·
4 收藏

进阶实验8-2.1 逆散列问题 (30分) 【浙大版 数据结构学习与实验指导】

给定长度为N的散列表,处理整数最常用的散列映射是H(x)=x%N。如果我们决定用线性探测解决冲突问题,则给定一个顺序输入的整数序列后,我们可以很容易得到这些整数在散列表中的分布。例如我们将 1、2、3 顺序插入长度为 3 的散列表HT[]后,将得到HT[0]=3,HT[1]=1,HT[2]=2的结果。但是现在要求解决的是“逆散列问题”,即给定整数在散列表中的分布,问这些整数是按什么顺序插入的?输入格式:输入的第一行是正整数 N(≤1000),为散列表的长度。第二行给出了 N 个整数,...
原创
发布博客 2020.08.10 ·
915 阅读 ·
0 点赞 ·
0 评论 ·
4 收藏

PAT(甲级)2019年春季考试

7-1Sexy Primes(20分)Sexy primes are pairs of primes of the form (p,p+6), so-named since "sex" is the Latin word for "six". (Quoted fromhttp://mathworld.wolfram.com/SexyPrimes.html)Now given an integer, you are supposed to tell if it is a sexy prime....
原创
发布博客 2020.07.23 ·
790 阅读 ·
0 点赞 ·
0 评论 ·
1 收藏

7-2 Block Reversing (25分) 【PAT 甲级19年冬考】

Given a singly linked listL. Let us consider everyKnodes as ablock(if there are less thanKnodes at the end of the list, the rest of the nodes are still considered as a block). Your job is to reverse all the blocks inL. For example, givenLas 1→2→3...
原创
发布博客 2020.07.22 ·
512 阅读 ·
0 点赞 ·
6 评论 ·
2 收藏

7-4 Cartesian Tree (30分) 【PAT 甲级19年冬考】

ACartesian treeis a binary tree constructed from a sequence of distinct numbers. The tree is heap-ordered, and an inorder traversal returns the original sequence. For example, given the sequence { 8, 15, 3, 4, 1, 5, 12, 10, 18, 6 }, the min-heap Cartesia..
原创
发布博客 2020.07.22 ·
170 阅读 ·
1 点赞 ·
0 评论 ·
0 收藏

7-3 Summit (25分) [PAT甲级 19年冬考]

Asummit(峰会) is a meeting of heads of state or government. Arranging the rest areas for the summit is not a simple job. The ideal arrangement of one area is to invite those heads so that everyone is a direct friend of everyone.Now given a set of tentati..
原创
发布博客 2020.07.22 ·
167 阅读 ·
0 点赞 ·
0 评论 ·
0 收藏

1117 Eddington Number (25分)

British astronomer Eddington liked to ride a bike. It is said that in order to show off his skill, he has even defined an "Eddington number",E-- that is, the maximum integerEsuch that it is forEdays that one rides more thanEmiles. Eddington's ownE...
原创
发布博客 2020.07.11 ·
134 阅读 ·
0 点赞 ·
0 评论 ·
0 收藏

1133 Splitting A Linked List (25分)

Given a singly linked list, you are supposed to rearrange its elements so that all the negative values appear before all of the non-negatives, and all the values in [0, K] appear before all those greater than K. The order of the elements inside each class
原创
发布博客 2020.07.09 ·
141 阅读 ·
0 点赞 ·
0 评论 ·
0 收藏

1148 Werewolf - Simple Version (20分)

Werewolf(狼人杀) is a game in which the players are partitioned into two parties: the werewolves and the human beings. Suppose that in a game,player #1 said: "Player #2 is a werewolf."; player #2 said: "Player #3 is a human."; player #3 said: "Player #4 i
原创
发布博客 2020.07.09 ·
168 阅读 ·
0 点赞 ·
0 评论 ·
0 收藏

1132 Cut Integer (20分)

Cutting an integer means to cut a K digits lone integer Z into two integers of (K/2) digits long integers A and B. For example, after cutting Z = 167334, we have A = 167 and B = 334. It is interesting to see that Z can be devided by the product of A and...
原创
发布博客 2020.07.05 ·
113 阅读 ·
0 点赞 ·
0 评论 ·
0 收藏

1129 Recommendation System (25分)

Recommendation system predicts the preference that a user would give to an item. Now you are asked to program a very simple recommendation system that rates the user's preference by the number of times that an item has been accessed by this user.Input Sp
原创
发布博客 2020.07.05 ·
164 阅读 ·
0 点赞 ·
0 评论 ·
0 收藏

1121 Damn Single (25分)

"Damn Single (单身狗)" is the Chinese nickname for someone who is being single. You are supposed to find those who are alone in a big party, so they can be taken care of.Input Specification:Each input file contains one test case. For each case, the first
原创
发布博客 2020.07.03 ·
106 阅读 ·
0 点赞 ·
0 评论 ·
0 收藏

1109 Group Photo (25分)

Formation is very important when taking a group photo. Given the rules of formingKrows withNpeople as the following: The number of people in each row must beN/K(round down to the nearest integer), with all the extra people (if any) standing in the...
原创
发布博客 2020.07.02 ·
169 阅读 ·
0 点赞 ·
0 评论 ·
0 收藏

1105 Spiral Matrix (25分)

This time your job is to fill a sequence ofNpositive integers into aspiral matrixin non-increasing order. A spiral matrix is filled in from the first element at the upper-left corner, then move in a clockwise spiral. The matrix hasmrows andncolumns...
原创
发布博客 2020.07.01 ·
127 阅读 ·
0 点赞 ·
0 评论 ·
0 收藏
加载更多