随笔分类 -  洛谷

上一页 1 2 3 4 5 6 7 ··· 13 下一页
洛谷中出现的知识总结、题解等
摘要:题目传送门 #include <bits/stdc++.h> using namespace std; const int N = 50010; struct Point { int x, y, z; } a[N]; bool cmp(const Point &a, const Point &b) 阅读全文
posted @ 2021-11-23 14:52 糖豆爸爸 阅读(45) 评论(0) 推荐(0) 编辑
摘要:题目传送门 #include <bits/stdc++.h> using namespace std; const int N = 5010; struct Person { int k; int s; } a[N]; bool cmp(const Person &a, const Person & 阅读全文
posted @ 2021-11-23 14:51 糖豆爸爸 阅读(477) 评论(0) 推荐(0) 编辑
摘要:题目传送门 一、原始方法 #include<bits/stdc++.h> using namespace std; const int N = 1010; int a[N], c[N]; int main() { int n; scanf("%d", &n); for (int i = 1; i < 阅读全文
posted @ 2021-11-23 14:50 糖豆爸爸 阅读(195) 评论(0) 推荐(0) 编辑
摘要:题目传送门 #include <bits/stdc++.h> using namespace std; const int N = 10010; int a[N]; int n, cnt; int main() { cin >> n; for (int i = 1; i <= n; i++) cin 阅读全文
posted @ 2021-11-23 14:48 糖豆爸爸 阅读(82) 评论(0) 推荐(0) 编辑
摘要:题目传送门 #include <bits/stdc++.h> using namespace std; const int N = 20010; int a[N]; int main() { int n, b; cin >> n >> b;//b是书架的高度 for (int i = 1; i <= 阅读全文
posted @ 2021-11-23 14:46 糖豆爸爸 阅读(51) 评论(0) 推荐(0) 编辑
摘要:题目传送门 #include <bits/stdc++.h> using namespace std; int n; const int N = 30; struct Node { string x; int num; } a[N]; bool cmp(const Node &A, const No 阅读全文
posted @ 2021-11-23 14:36 糖豆爸爸 阅读(100) 评论(0) 推荐(0) 编辑
摘要:题目传送门 #include <bits/stdc++.h> using namespace std; const int N = 310; int n; struct Student { int id, chinese, total; } a[N]; bool cmp(const Student 阅读全文
posted @ 2021-11-23 14:32 糖豆爸爸 阅读(114) 评论(0) 推荐(0) 编辑
摘要:题目传送门 #include<bits/stdc++.h> using namespace std; const int N = 110; int a[N]; int main() { int n; cin >> n; for (int i = 0; i < n; i++) cin >> a[i]; 阅读全文
posted @ 2021-11-23 14:31 糖豆爸爸 阅读(51) 评论(0) 推荐(0) 编辑
摘要:题目传送门 #include<bits/stdc++.h> using namespace std; const int N = 5000010; int a[N]; void quick_sort(int q[], int l, int r, int k) { if (l >= r)return; 阅读全文
posted @ 2021-11-23 13:51 糖豆爸爸 阅读(43) 评论(0) 推荐(0) 编辑
摘要:题目传送门 #include<bits/stdc++.h> using namespace std; const int N = 100010; int a[N]; void quick_sort(int q[], int l, int r) { if (l >= r) return; int i 阅读全文
posted @ 2021-11-23 13:47 糖豆爸爸 阅读(37) 评论(0) 推荐(0) 编辑
摘要:题目传送门 //P1271.cpp #include <bits/stdc++.h> using namespace std; const int N = 1010; int a[N]; int n, m, tmp; int main() { cin >> n >> m; for (int i = 阅读全文
posted @ 2021-11-23 13:46 糖豆爸爸 阅读(80) 评论(0) 推荐(0) 编辑
摘要:P1045 [NOIP2003 普及组] 麦森数 题目传送门 一、前导知识 高精度乘法 老师将高精乘高精,高精乘低精想办法合并成了一个模板 没错应该看的出来,高精度乘法其实就是一位一位去乘,然后按位存储在数组里面,思路差不多就是这样。 由于位数比较多,我们用字符串来进行输入,处理后按位存到整型数组中 阅读全文
posted @ 2021-11-22 15:54 糖豆爸爸 阅读(408) 评论(0) 推荐(0) 编辑
摘要:题目传送门 #include <bits/stdc++.h> using namespace std; typedef long long LL; const int N = 1e5 + 10; int n, num; int ans; vector<int> c; int a[N], al; in 阅读全文
posted @ 2021-11-22 15:53 糖豆爸爸 阅读(80) 评论(0) 推荐(0) 编辑
摘要:题目传送门 #include <bits/stdc++.h> using namespace std; const int N = 1e6 + 10; int a[N]; void mul(int a[], int b, int &len) { int t = 0; for (int i = 1; 阅读全文
posted @ 2021-11-22 15:51 糖豆爸爸 阅读(99) 评论(0) 推荐(0) 编辑
摘要:题目传送门 #include <bits/stdc++.h> using namespace std; /* 1.所有信息输入后排序,排序方式如下: (1)先按帮贡排序; (2)如帮贡一样,则按输入顺序排列。 2.再重新编好职位后排输出顺序,也就是职位内的排名,排序方式如下: (1)先按现在的职位排 阅读全文
posted @ 2021-11-22 15:49 糖豆爸爸 阅读(129) 评论(0) 推荐(1) 编辑
摘要:题目传送门 #include <bits/stdc++.h> using namespace std; const int N = 20 + 10; //m<20,n<20,范围是20以内,开大一点防止出错 //本题,不吸氧,可以过10个点,第11个点TLE。吸氧后可以能完全部11个点。 //用来记 阅读全文
posted @ 2021-11-22 15:46 糖豆爸爸 阅读(202) 评论(0) 推荐(0) 编辑
摘要:题目传送门 #include <bits/stdc++.h> using namespace std; //批量输出某个字符 void print(char c, int cnt) { for (int i = 1; i <= cnt; i++) cout << c; } int main() { 阅读全文
posted @ 2021-11-22 15:41 糖豆爸爸 阅读(380) 评论(0) 推荐(0) 编辑
摘要:题目传送门 #include <bits/stdc++.h> using namespace std; const int N = 110; int main() { int n; cin >> n; int x; // a[0~n-1]是系数,a[n]是常数 for (int i = 0; i < 阅读全文
posted @ 2021-11-22 15:38 糖豆爸爸 阅读(98) 评论(0) 推荐(0) 编辑
摘要:题目传送门 #include <bits/stdc++.h> using namespace std; const int N = 10; char g[N][N]; //北,东,南,西 int dx[] = {-1, 0, 1, 0}; int dy[] = {0, 1, 0, -1}; int 阅读全文
posted @ 2021-11-22 15:34 糖豆爸爸 阅读(108) 评论(0) 推荐(0) 编辑
摘要:题目传送门 一、以下标0开始 #include <bits/stdc++.h> using namespace std; const int N = 210; //0 表示“剪刀”,1 表示“石头”,2 表示“布”,3 表示“蜥蜴人”,4表示“斯波克”。 //看图打表写出对阵双方的胜负平结果二维数组 阅读全文
posted @ 2021-11-22 15:25 糖豆爸爸 阅读(219) 评论(0) 推荐(0) 编辑

上一页 1 2 3 4 5 6 7 ··· 13 下一页
Live2D
点击右上角即可分享
微信分享提示