摘要: P1093 奖学金 题目链接:https://www.luogu.org/problem/P1093 思路: ​ 该题可以使用结构体加sort排序。 代码: c++ include using namespace std; typedef struct pri { int z,y,h; }pri; 阅读全文
posted @ 2019-08-01 22:37 幽灵小一只 阅读(169) 评论(0) 推荐(0) 编辑
摘要: P1068 分数线划定 题目链接:https://www.luogu.org/problem/P1068 思路: ​ 该题可以使用结构体加sort排序。 代码: c++ include using namespace std; typedef struct pri//结构体 { int k; int 阅读全文
posted @ 2019-08-01 21:35 幽灵小一只 阅读(382) 评论(0) 推荐(0) 编辑
摘要: P1781 宇宙总统 题目链接:https://www.luogu.org/problem/P1781 思路: ​ 因为票数可能会很大,可能会到100位数字,即10的100次方,所以将这个数字每一位都存入字符串。 代码: c++ include using namespace std; int ma 阅读全文
posted @ 2019-08-01 20:53 幽灵小一只 阅读(393) 评论(0) 推荐(0) 编辑
摘要: P1059 明明的随机数 题目链接:https://www.luogu.org/problem/P1059 代码: c++ include using namespace std; int main() { //freopen("in.txt","r",stdin); //freopen("out. 阅读全文
posted @ 2019-08-01 20:38 幽灵小一只 阅读(164) 评论(0) 推荐(0) 编辑
摘要: P1328 生活大爆炸版石头剪刀布 题目链接:https://www.luogu.org/problem/P1328 思路: ​ 由题意可知,0—剪刀,1—石头,2—布;3—蜥蜴人,4—斯波克。 则 02,0 3,03,14; 3 4; 代码: c++ include using namespace 阅读全文
posted @ 2019-08-01 20:32 幽灵小一只 阅读(156) 评论(0) 推荐(0) 编辑
摘要: P1003 铺地毯 题目链接:https://www.luogu.org/problem/P1003 代码: c++ include using namespace std; int main() { //freopen("in.txt","r",stdin); //freopen("out.txt 阅读全文
posted @ 2019-08-01 20:20 幽灵小一只 阅读(106) 评论(0) 推荐(0) 编辑
摘要: 1128: mxh道歉记 题目链接:https://oj.chimuyuan.cn/problem/show/1128 代码: c++ include using namespace std; char a[50][50]; int b[8][2]={{ 1,1},{0,1},{1,1},{ 1,0 阅读全文
posted @ 2019-08-01 20:04 幽灵小一只 阅读(100) 评论(0) 推荐(0) 编辑
摘要: 今天,你惹对象生气了吗 题目链接:https://ac.nowcoder.com/acm/contest/298/B 思路: ​ 先对可以采的花进行覆盖,再用dfs进行搜索。 代码: c++ include using namespace std; char a[100][100]; int n,m 阅读全文
posted @ 2019-08-01 19:37 幽灵小一只 阅读(117) 评论(0) 推荐(0) 编辑
该文被密码保护。 阅读全文
posted @ 2019-08-01 19:24 幽灵小一只 阅读(0) 评论(0) 推荐(0) 编辑
摘要: 油田 题目链接:https://vjudge.net/problem/ZOJ 1709 思路: ​ 多组输入直到输入00为止,输出油田的个数;利用dfs进行搜索。 代码: c++ include using namespace std; char a[105][105]; int b[8][2]={ 阅读全文
posted @ 2019-08-01 19:23 幽灵小一只 阅读(100) 评论(0) 推荐(0) 编辑