会员
众包
新闻
博问
闪存
赞助商
HarmonyOS
Chat2DB
所有博客
当前博客
我的博客
我的园子
账号设置
会员中心
简洁模式
...
退出登录
注册
登录
一二三四五 上山打老虎
heichuanchuan
博客园
首页
新随笔
联系
订阅
管理
上一页
1
2
3
4
5
6
7
8
···
15
下一页
2021年4月23日
天梯赛L2-001 紧急救援 (25 分)
摘要: 链接:https://pintia.cn/problem-sets/994805046380707840/problems/994805073643683840 思路:最短路的变式题 dijk 中vis表示是否被当作过最小点,因为堆中已经有这个点了但是没有被当作最小点过,所有堆中可能存在多个同一个点
阅读全文
posted @ 2021-04-23 08:57 黒川川
阅读(66)
评论(0)
推荐(0)
2021年4月21日
天梯赛L1-070 吃火锅 (15 分)string中find用法
摘要: 链接:https://pintia.cn/problem-sets/994805046380707840/problems/1336215880692482053 string中find的使用方法; 推荐使用:string str; str.find("smallstr",(int)s);从s处开始
阅读全文
posted @ 2021-04-21 22:26 黒川川
阅读(248)
评论(0)
推荐(0)
天梯赛L1-028 判断素数 (10 分)
摘要: 链接:https://pintia.cn/problem-sets/994805046380707840/problems/994805106325700608 暴力判素数故意卡i*i<=x 代码: #include<bits/stdc++.h> using namespace std; bool
阅读全文
posted @ 2021-04-21 16:50 黒川川
阅读(114)
评论(2)
推荐(0)
天梯赛L1-049 天梯赛座位分配 (20 分)
摘要: 链接:https://pintia.cn/problem-sets/994805046380707840/problems/994805081289900032 思路:首先理解清楚题意:给队员分座位,保证同一个学校的队员不挨着,如果前一个座位的同学是自己学校的,那么隔一个去坐(意思等同于文中,最后剩
阅读全文
posted @ 2021-04-21 16:42 黒川川
阅读(128)
评论(0)
推荐(0)
2021年4月20日
天梯赛L1-048 矩阵A乘以B (15 分)
摘要: 链接:https://pintia.cn/problem-sets/994805046380707840/problems/994805082313310208 矩阵乘法: for(int i=1;i<=a;i++) for(int j=1;j<=y;j++) for(int k=1;k<=b;k+
阅读全文
posted @ 2021-04-20 22:18 黒川川
阅读(79)
评论(0)
推荐(0)
天梯赛L1-046 整除光棍 (20 分)
摘要: 链接:https://pintia.cn/problem-sets/994805046380707840/problems/994805084284633088 思路: 思路1:模拟乘法,计算为了使当前位为1,应该乘的数为几,需要搜索,程序编写麻烦;//没写出来 思路2:模拟除法, 思路参考链接:h
阅读全文
posted @ 2021-04-20 21:46 黒川川
阅读(51)
评论(0)
推荐(0)
天梯赛L1-020 帅到没朋友 (20 分)
摘要: 链接:https://pintia.cn/problem-sets/994805046380707840/problems/994805117167976448 反思:这个题中每个人的名称是五位的数字,但是用int类型存储的话只能得到15分,最后两个测试数据过不去;也就是测试数据中可能存在整数值相同
阅读全文
posted @ 2021-04-20 11:19 黒川川
阅读(151)
评论(0)
推荐(0)
2021年4月15日
蓝桥杯-红与黑
摘要: 链接:https://www.acwing.com/problem/content/1115/ 代码: bfs: #include<iostream> #include<algorithm> #include<queue> using namespace std; char s[25][25]; i
阅读全文
posted @ 2021-04-15 10:49 黒川川
阅读(66)
评论(0)
推荐(0)
蓝桥杯-献给阿尔吉侬的花束
摘要: 链接:https://www.acwing.com/problem/content/1103/ 代码: #include<bits/stdc++.h> using namespace std; using PII=pair<int,int>; int dx[]={0,-1,0,1}; int dy[
阅读全文
posted @ 2021-04-15 10:44 黒川川
阅读(80)
评论(0)
推荐(0)
蓝桥杯-地牢大师
摘要: 链接:https://www.acwing.com/problem/content/1098/ 思路:1:三维bfs:可以分为当前层数内的二维内偏移和层数的一维偏移 代码: #include<iostream> #include<queue> #include<string> #include<cs
阅读全文
posted @ 2021-04-15 10:42 黒川川
阅读(54)
评论(0)
推荐(0)
上一页
1
2
3
4
5
6
7
8
···
15
下一页
公告