顺序存储结构表示非0项 链表结构存储非零项 线性表的抽象描述: 名称:线性表(List) 数据对象集:n个元素构成的有序序列 操作集: 1、List MakeEmpty():初始化一个空线性表L 2、ElementType FindKth(int K, List L):根据位序K,返回相应元素 3、 ...
分类:
其他好文 时间:
2018-03-15 23:03:40
阅读次数:
266
题目描述 num[i]表示在[l,r]内数字i的个数 当区间变为[l±1,r]或,[l,r±1]的时候,num[i]由0变为1或由1变为0时答案才会变化 #include<complex> #include<cstdio> #include<algorithm> using namespace st ...
分类:
其他好文 时间:
2018-03-15 19:22:23
阅读次数:
152
邮票分你一半 时间限制:1000 ms | 内存限制:65535 KB 难度:3 邮票分你一半 时间限制:1000 ms | 内存限制:65535 KB 难度:3 #include <iostream>using namespace std; int a[1002],mid,m,Max;//每个邮票 ...
分类:
其他好文 时间:
2018-03-15 13:17:14
阅读次数:
146
阶乘的0 时间限制:3000 ms | 内存限制:65535 KB 难度:3 阶乘的0 时间限制:3000 ms | 内存限制:65535 KB 难度:3 #include<iostream> using namespace std; int main() { int n,m; cin>>n; wh ...
分类:
其他好文 时间:
2018-03-14 23:40:08
阅读次数:
216
回文字符串 时间限制:3000 ms | 内存限制:65535 KB 难度:4 回文字符串 时间限制:3000 ms | 内存限制:65535 KB 难度:4 #include <iostream>#include <cstring>using namespace std; int dp[1005] ...
分类:
其他好文 时间:
2018-03-13 00:52:46
阅读次数:
198
公约数和公倍数 时间限制:1000 ms | 内存限制:65535 KB 难度:1 公约数和公倍数 时间限制:1000 ms | 内存限制:65535 KB 难度:1 #include <iostream>using namespace std; int gcd(int x,int y){ if(y ...
分类:
其他好文 时间:
2018-03-11 21:09:07
阅读次数:
160
孪生素数问题 时间限制:3000 ms | 内存限制:65535 KB 难度:3 孪生素数问题 时间限制:3000 ms | 内存限制:65535 KB 难度:3 #include <iostream>using namespace std; int a[10000003]; //把m之前的素数保存 ...
分类:
其他好文 时间:
2018-03-11 19:25:18
阅读次数:
309
疯牛 时间限制:1000 ms | 内存限制:65535 KB 难度:4 疯牛 时间限制:1000 ms | 内存限制:65535 KB 难度:4 #include <iostream>#include <algorithm>using namespace std; long long a[1000 ...
分类:
其他好文 时间:
2018-03-11 17:22:25
阅读次数:
152
非洲小孩 时间限制:1000 ms | 内存限制:65535 KB 难度:2 非洲小孩 时间限制:1000 ms | 内存限制:65535 KB 难度:2 #include <iostream>#include <algorithm> #include <cstdio>using namespace ...
分类:
其他好文 时间:
2018-03-10 20:31:04
阅读次数:
149