摘要: 题目传送门 //P1042.cpp #include <bits/stdc++.h> using namespace std; //每行至多 25 个字母,最多有 2500 行。 const int N = 25 * 2500 + 10; int a[N];//小华的输赢状态表 int idx; i 阅读全文
posted @ 2021-11-19 17:27 糖豆爸爸 阅读(206) 评论(0) 推荐(0)
摘要: 题目传送门 #include <bits/stdc++.h> using namespace std; const int N = 1e6; struct Student { string name; int age, score; } a[N]; int main() { int n; cin > 阅读全文
posted @ 2021-11-19 09:47 糖豆爸爸 阅读(162) 评论(0) 推荐(0)
摘要: 题目传送门 #include <bits/stdc++.h> using namespace std; typedef long long LL; int n; /** 思路分析: 1、比如第10天桃子数量为1,我们记为s10=1. 2、那么我们可以考虑s9是多少? 3、第9天时,吃掉了s9的一半, 阅读全文
posted @ 2021-11-19 09:45 糖豆爸爸 阅读(172) 评论(0) 推荐(0)
摘要: 题目传送门 #include<bits/stdc++.h> using namespace std; typedef long long LL; const int N = 110; LL a[N]; int n; LL res; int main() { //录入进来,终止条件是CTRL+D wh 阅读全文
posted @ 2021-11-19 09:43 糖豆爸爸 阅读(86) 评论(0) 推荐(0)
摘要: 题目传送门 一、原始暴力法 #include<bits/stdc++.h> using namespace std; const int N = 100000010; //判断一个数是不是质数 bool isPrime(int n) { if (n < 2) return false; for (i 阅读全文
posted @ 2021-11-19 09:36 糖豆爸爸 阅读(143) 评论(0) 推荐(0)
摘要: 题目传送门 一、暴力解法 #include <bits/stdc++.h> using namespace std; bool isPrime(int n) { for (int i = 2; i <= n / i; i++) if (n % i == 0) return false; return 阅读全文
posted @ 2021-11-19 09:33 糖豆爸爸 阅读(127) 评论(0) 推荐(0)
摘要: 题目传送门 一、原始解法 #include <bits/stdc++.h> using namespace std; //判断一个数是不是质数 bool isPrime(int n) { if (n < 2) return false; for (int i = 2; i <= n / i; i++ 阅读全文
posted @ 2021-11-19 09:31 糖豆爸爸 阅读(275) 评论(0) 推荐(0)
摘要: 题目传送门 #include <bits/stdc++.h> using namespace std; const int N = 1010; struct node { int id;//学号 double sc1, sc2;//学业成绩和素质拓展成绩 int score;//学业成绩和素质拓展成 阅读全文
posted @ 2021-11-19 09:26 糖豆爸爸 阅读(402) 评论(0) 推荐(0)
摘要: 题目传送门 #include <bits/stdc++.h> using namespace std; const int N = 1100; struct Student { string name; int x; int y; int z; int sum; } a[N]; int n; voi 阅读全文
posted @ 2021-11-19 09:25 糖豆爸爸 阅读(361) 评论(0) 推荐(0)
摘要: 题目传送门 #include <bits/stdc++.h> using namespace std; struct Student { string Name; int chinese; int math; int english; } a, ans; int main() { int n; ci 阅读全文
posted @ 2021-11-19 09:22 糖豆爸爸 阅读(164) 评论(0) 推荐(0)
摘要: 题目传送门 #include <bits/stdc++.h> using namespace std; const int N = 1100; int a[N][N]; /**递归经典题 1、默认二维数组全是0,可以理解为默认都被赦免,如果找到不被赦免的,需要标识为1. 2、看到2^n之类的题,一般 阅读全文
posted @ 2021-11-19 09:16 糖豆爸爸 阅读(134) 评论(0) 推荐(0)
摘要: 题目传送门 #include <bits/stdc++.h> using namespace std; int f(int n) { if (n == 1) return 1; return n * f(n - 1); } int main() { int n; cin >> n; cout << 阅读全文
posted @ 2021-11-19 09:03 糖豆爸爸 阅读(85) 评论(0) 推荐(0)
摘要: 题目传送门 #include <bits/stdc++.h> using namespace std; const int N = 110; int n, m; int a[N]; double Max = -1; int main() { cin >> n >> m; for (int i = 1 阅读全文
posted @ 2021-11-19 09:02 糖豆爸爸 阅读(121) 评论(0) 推荐(0)
摘要: 题目传送门 #include <bits/stdc++.h> using namespace std; //是不是闰年 bool isRunYear(int y) { if ((y % 4 == 0 && y % 100 != 0) || y % 400 == 0) return true; ret 阅读全文
posted @ 2021-11-19 09:00 糖豆爸爸 阅读(70) 评论(0) 推荐(0)
摘要: 题目传送门 #include <bits/stdc++.h> using namespace std; const int N = 110; int a[N]; bool isPrime(int n) { if (n < 2) return false; for (int i = 2; i <= n 阅读全文
posted @ 2021-11-19 08:58 糖豆爸爸 阅读(64) 评论(0) 推荐(0)
摘要: 题目传送门 #include <bits/stdc++.h> using namespace std; double dis(double x1, double y1, double x2, double y2) { return sqrt((x2 - x1) * (x2 - x1) + (y2 - 阅读全文
posted @ 2021-11-19 08:56 糖豆爸爸 阅读(208) 评论(0) 推荐(0)
Live2D