随笔分类 -  待解决

摘要:#include <bits/stdc++.h> #define LOCAL using namespace std; template<typename A, typename B> ostream& operator<<(ostream &os, const pair<A, B> &p) { r 阅读全文
posted @ 2022-02-05 22:21 yys_c 阅读(61) 评论(0) 推荐(0)
摘要:#include<iostream> #include<vector> #include<queue> #include<cstring> using namespace std; const int N = 110; char os[] = {'N', 'S', 'W', 'E'}; int dx 阅读全文
posted @ 2021-09-28 19:18 yys_c 阅读(39) 评论(0) 推荐(0)
摘要:这题的dp怎么分析 学习dp的刷表法(这题的正推怎么做) #include<iostream> using namespace std; const int N = 10010; struct Node{ int a, b; }works[N]; int f[N]; int cnt[N]; int 阅读全文
posted @ 2021-01-28 14:16 yys_c 阅读(56) 评论(0) 推荐(0)
摘要:怀疑人生的题。。。。。bfs理解不够,我怀疑我会不会写bfs 问题: 是否能使用level数组来标记步数?在将level数组改成结构体绑定步数之后AC bfs出口语句if(g[x][y] == '=') return 步数 这句话放在哪到底有没有影响,我在将这句话从上面改到下面后AC 传送门转移为什 阅读全文
posted @ 2020-10-15 20:51 yys_c 阅读(166) 评论(0) 推荐(0)
摘要:问题描述 有一条长为n的走廊,小明站在走廊的一端,每次可以跳过不超过p格,每格都有一个权值wi。 小明要从一端跳到另一端,不能回跳,正好跳t次,请问他跳过的方格的权值和最大是多少? 输入格式 输入的第一行包含两个整数n, p, t,表示走廊的长度,小明每次跳跃的最长距离和小明跳的次数。 接下来n个整 阅读全文
posted @ 2020-10-02 12:30 yys_c 阅读(525) 评论(0) 推荐(0)
摘要:#include<iostream> #include<map> #include<string> #include<queue> #include<cstring> using namespace std; const int N = 400000; #define state pair<int, 阅读全文
posted @ 2020-09-15 19:25 yys_c 阅读(163) 评论(0) 推荐(0)
摘要:问题描述 如下图所示,3 x 3 的格子中填写了一些整数。 + +--+ |10 1|52| +--***--+ |20|30 1| *******--+ | 1| 2| 3| +--+--+--+ 我们沿着图中的星号线剪开,得到两个部分,每个部分的数字和都是60。 我们沿着图中的星号线剪开,得到两 阅读全文
posted @ 2020-09-15 10:38 yys_c 阅读(140) 评论(0) 推荐(0)