上一页 1 ··· 13 14 15 16 17 18 19 20 21 ··· 27 下一页
摘要: 题解:根据题目给的程序,就是计算给的这个序列,进行k次到n的循环,每个数需要加的次数是k*n^(k-1),所以快速幂取模,算计一下就可以了。#include using namespace std;typedef long long ll;const int INF... 阅读全文
posted @ 2018-09-10 21:15 Mercury_Lc 阅读(111) 评论(0) 推荐(0)
摘要: Problem Description 给定n(1using namespace std;const int maxn = 100001;struct node{ int *elem; int len;};void Creatlist(struct nod... 阅读全文
posted @ 2018-09-05 15:24 Mercury_Lc 阅读(128) 评论(0) 推荐(0)
摘要: Problem Description 给定n(1using namespace std;const int maxn = 100001;struct node{ int *elem; int len;};void Creatlist(struct nod... 阅读全文
posted @ 2018-09-05 15:24 Mercury_Lc 阅读(164) 评论(0) 推荐(0)
摘要: Problem Description顺序表内按照由小到大的次序存放着n个互不相同的整数,任意输入一个整数,判断该整数在顺序表中是否存在。如果在顺序表中存在该整数,输出其在表中的序号;否则输出“No Found!"。Input 第一行输入整数n (1 using na... 阅读全文
posted @ 2018-09-05 14:17 Mercury_Lc 阅读(191) 评论(0) 推荐(0)
摘要: Problem Description顺序表内按照由小到大的次序存放着n个互不相同的整数,任意输入一个整数,判断该整数在顺序表中是否存在。如果在顺序表中存在该整数,输出其在表中的序号;否则输出“No Found!"。Input 第一行输入整数n (1 using na... 阅读全文
posted @ 2018-09-05 14:17 Mercury_Lc 阅读(144) 评论(0) 推荐(0)
摘要: Problem Description已知顺序表A与B是两个有序的顺序表,其中存放的数据元素皆为普通整型,将A与B表归并为C表,要求C表包含了A、B表里所有元素,并且C表仍然保持有序。Input 输入分为三行:第一行输入m、n(1#include #include c... 阅读全文
posted @ 2018-09-04 17:10 Mercury_Lc 阅读(184) 评论(0) 推荐(0)
摘要: Problem Description已知顺序表A与B是两个有序的顺序表,其中存放的数据元素皆为普通整型,将A与B表归并为C表,要求C表包含了A、B表里所有元素,并且C表仍然保持有序。Input 输入分为三行:第一行输入m、n(1#include #include c... 阅读全文
posted @ 2018-09-04 17:10 Mercury_Lc 阅读(238) 评论(0) 推荐(0)
摘要: Problem Description一个长度为len(1#include #include const int maxn = 1000000;struct node{ int *elem; int len;};void Creatlist(int len... 阅读全文
posted @ 2018-09-04 10:55 Mercury_Lc 阅读(141) 评论(0) 推荐(0)
摘要: Problem Description一个长度为len(1#include #include const int maxn = 1000000;struct node{ int *elem; int len;};void Creatlist(int len... 阅读全文
posted @ 2018-09-04 10:55 Mercury_Lc 阅读(470) 评论(0) 推荐(0)
摘要: 题解:用一个for,循环m次,每次都把最前面的放到最后面,就可以了。#include #include #include const int maxn = 1000000;struct node{ int *elem; int len;};void C... 阅读全文
posted @ 2018-09-04 10:00 Mercury_Lc 阅读(148) 评论(0) 推荐(0)
上一页 1 ··· 13 14 15 16 17 18 19 20 21 ··· 27 下一页