摘要: #include<stdio.h> #include<stdlib.h> typedef struct Lnode{ int data; struct Lnode *next; }Lnode; Lnode *head, *end, *biaoji; int n, m, k; //定义头、尾节点和人数 阅读全文
posted @ 2020-11-22 13:46 Sonoda_Umi 阅读(163) 评论(0) 推荐(0)
摘要: #include<algorithm> #include<cstdio> #include<cstdlib> #include<iostream> #include<cmath> #include<cstring> #include<string> #include<queue> using nam 阅读全文
posted @ 2020-06-12 23:21 Sonoda_Umi 阅读(93) 评论(0) 推荐(0)
摘要: 求a的b次幂关于c的余数;int PowerMod(int a, int b, int c) { int ans = 1; a = a % c; while(b>0) { if(b % 2 = = 1) ans = (ans * a) % c; b = b/2; a = (a * a) % c; } 阅读全文
posted @ 2020-02-29 14:01 Sonoda_Umi 阅读(99) 评论(0) 推荐(0)
摘要: 蒟蒻水的第一发博客,被一个模板题折磨了一下午(笑) 洛谷 P1060 代码如下: #include<cstdio> #include<iostream> #include<algorithm> using namespace std; int chengji[100000000], jiage[30 阅读全文
posted @ 2020-02-17 12:27 Sonoda_Umi 阅读(130) 评论(0) 推荐(0)