题意是给出一个N,将所有分母小于N的非负分数排序输出。/*ID: modengd1PROG: frac1LANG: C++*/#include #include #include #include using namespace std;bool vis[261][261];//判重,枚举出来之后的...
分类:
其他好文 时间:
2015-09-02 00:12:06
阅读次数:
167
This link has a very neat code, which is rewritten below using stacksince thepushandpopoperations of it areO(1)time, while thepop_backandpush_backofve...
分类:
其他好文 时间:
2015-09-02 00:11:14
阅读次数:
208
Problem DescriptionJohn are playing with blocks. There are N blocks (1 2 #include 3 #include 4 using namespace std; 5 #define N 30006 6 int fa[N]; 7 ....
分类:
其他好文 时间:
2015-09-02 00:10:48
阅读次数:
189
概念如果索引包含所有满足查询需要的数据的索引成为覆盖索引(Covering Index),也就是平时所说的不需要回表操作判断标准使用explain,可以通过输出的extra列来判断,对于一个索引覆盖查询,显示为using index,MySQL查询优化器在执行查询前会决定是否有索引覆盖查询注意1、覆...
分类:
数据库 时间:
2015-09-02 00:00:50
阅读次数:
477
1 #include 2 #include 3 #include 4 5 using namespace std; 6 7 long long dp[100010]; 8 int start[100010]; 9 int arr[100010];10 11 int main()12 {1...
分类:
其他好文 时间:
2015-09-01 21:22:52
阅读次数:
197
#include using namespace std;int f[20];#define MAX 20typedef struct{ char ch[MAX]; int len;}_string;int _length(_string *s){ int i=0; whil...
分类:
编程语言 时间:
2015-09-01 21:15:50
阅读次数:
241
题目传送门题意:找一棵树使得造价最少,造价为每个点的子节点造价和*边的造价和分析:最短路跑出1根节点到每个点的最短边权值,然后每个点的权值*最短边距和就是答案,注意INF开足够大,n#include #include #include #include #include using namespac...
分类:
其他好文 时间:
2015-09-01 19:54:07
阅读次数:
236
水题: 费马小定理+快速幂+矩阵快速幂 (第一次用到费马小定理) #include using namespace std; typedef long long LL; const LL MOD = 1000000006; const LL MOD1 = 1000000007; struct Mat...
分类:
其他好文 时间:
2015-09-01 19:50:48
阅读次数:
169
#include using namespace std;int Arr[10] = { 1,2,3,4,5 };int select[10];int index = 0;/*common func*/void swap(int a, int b){ int c = Arr[a]; ...
分类:
编程语言 时间:
2015-09-01 19:46:14
阅读次数:
185
Download Hacking Team Database from torrent using magnet link
分类:
数据库 时间:
2015-09-01 19:45:46
阅读次数:
246