摘要:
题目: 思路: 在“.”的位置插入k个“X”保证所有“.’连贯; 代码实现: #include<iostream>#include<stdio.h>using namespace std;char Map[510][510];bool book[510][510];int n,m,k;void df 阅读全文
posted @ 2021-07-19 17:17
wateriness
阅读(57)
评论(0)
推荐(0)
摘要:
题目: 思路: 有n长度的绳子,要用长度为a,b,c长度的小绳子拼 直接暴力枚举,在运用dp进行优化 代码实现: #include<cstdio>#include<cstring>#include<iostream>#include<algorithm>using namespace std;int 阅读全文
posted @ 2021-07-19 17:06
wateriness
阅读(41)
评论(0)
推荐(0)
摘要:
题目 思路: 寻找区间 [a,b]中最小的区间长度 l ,使得在区间里有至少k个质数; 首先写一个质数表 然后运用二分查找不断缩小l,直到找的最接近的; 代码实现: #include<cstring>#include<stdio.h>#define maxn 1000000int prime[max 阅读全文
posted @ 2021-07-19 16:54
wateriness
阅读(38)
评论(0)
推荐(0)

浙公网安备 33010602011771号