上一页 1 2 3 4 5 6 ··· 63 下一页
摘要: t3 题目大意:给n个字符串,然后统计出,出现次数前k多和前k少的(出现次数不能为0)的字符串 输入: 第一行n和k 下面n行,每行一个字符串 解题思路:用map存一下字符串出现次数,然后都拿到结构体里面,然后结构体排序,注意当次数一样的时候,要按字典序排序 具体看代码 #include<bits/ 阅读全文
posted @ 2020-09-07 12:56 晴屿 阅读(132) 评论(0) 推荐(0) 编辑
摘要: t1 大概题意 有个楼梯比较高,问有多少种可以方式可以走上去,但有特殊得要求:一是每次可以走一步或者两步,二是不能连续的走两步 计算有多少种方法到达顶层 输入:楼层的层数 输出:一共有多少种走法 思路:直接dp就好了,设dp方程为dp[i][2],dp[i][0]表示走一步之后达到第i层,那么转移方 阅读全文
posted @ 2020-09-06 13:17 晴屿 阅读(296) 评论(0) 推荐(0) 编辑
摘要: #include<algorithm> #include<iostream> #include<cstdlib> #include<cstring> #include<cctype> #include<cstdio> #include<vector> #include<string> #includ 阅读全文
posted @ 2020-07-26 12:59 晴屿 阅读(147) 评论(0) 推荐(0) 编辑
摘要: #include<map> #include<queue> #include<time.h> #include<limits.h> #include<cmath> #include<ostream> #include<iterator> #include<set> #include<stack> # 阅读全文
posted @ 2020-07-03 14:58 晴屿 阅读(150) 评论(0) 推荐(0) 编辑
摘要: #include<map> #include<queue> #include<time.h> #include<limits.h> #include<cmath> #include<ostream> #include<iterator> #include<set> #include<stack> # 阅读全文
posted @ 2020-07-03 14:41 晴屿 阅读(144) 评论(0) 推荐(0) 编辑
摘要: 参考:https://www.luogu.com.cn/blog/RPdreamer/p2051 #include<map> #include<queue> #include<time.h> #include<limits.h> #include<cmath> #include<ostream> # 阅读全文
posted @ 2020-07-03 13:55 晴屿 阅读(196) 评论(0) 推荐(0) 编辑
摘要: E1 #include<cstdio> #include<cstring> #include<iostream> #include<algorithm> #include<map> using namespace std; #define int long long const int N=1e6+ 阅读全文
posted @ 2020-07-02 10:08 晴屿 阅读(319) 评论(0) 推荐(0) 编辑
摘要: #include<cstdio> #include<cstring> #include<iostream> #include<algorithm> using namespace std; #define int long long int mp[410][410]; void solve() { 阅读全文
posted @ 2020-07-02 10:06 晴屿 阅读(205) 评论(0) 推荐(0) 编辑
摘要: #include<cstdio> #include<cstring> #include<iostream> #include<algorithm> using namespace std; const int N=6e6+10; #define int long long int e[N],h[N] 阅读全文
posted @ 2020-07-02 10:02 晴屿 阅读(157) 评论(0) 推荐(0) 编辑
摘要: #include <bits/stdc++.h> using namespace std; const int maxn=1e2+1; char a[maxn][maxn]; int r[maxn],c[maxn];//r是行,c是列 int T; void solve() { int n,m,fl 阅读全文
posted @ 2020-07-02 10:01 晴屿 阅读(119) 评论(0) 推荐(0) 编辑
上一页 1 2 3 4 5 6 ··· 63 下一页