摘要:
P1045 [NOIP2003 普及组] 麦森数 题目传送门 一、前导知识 高精度乘法 老师将高精乘高精,高精乘低精想办法合并成了一个模板 没错应该看的出来,高精度乘法其实就是一位一位去乘,然后按位存储在数组里面,思路差不多就是这样。 由于位数比较多,我们用字符串来进行输入,处理后按位存到整型数组中 阅读全文
posted @ 2021-11-22 15:54
糖豆爸爸
阅读(589)
评论(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
糖豆爸爸
阅读(101)
评论(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
糖豆爸爸
阅读(114)
评论(0)
推荐(0)
摘要:
题目传送门 #include <bits/stdc++.h> using namespace std; /* 1.所有信息输入后排序,排序方式如下: (1)先按帮贡排序; (2)如帮贡一样,则按输入顺序排列。 2.再重新编好职位后排输出顺序,也就是职位内的排名,排序方式如下: (1)先按现在的职位排 阅读全文
posted @ 2021-11-22 15:49
糖豆爸爸
阅读(144)
评论(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
糖豆爸爸
阅读(229)
评论(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
糖豆爸爸
阅读(468)
评论(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
糖豆爸爸
阅读(116)
评论(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
糖豆爸爸
阅读(119)
评论(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
糖豆爸爸
阅读(311)
评论(0)
推荐(0)

浙公网安备 33010602011771号