String[] names = { "吴松", "钱东宇", "伏晨", "陈陆", "周蕊", "林日鹏", "何昆", "关欣" }; int[] scores = { 89, 90, 98, 56, 60, 91, 93, 85 }; int max = scores[0]; int ind... ...
分类:
其他好文 时间:
2018-08-31 13:17:28
阅读次数:
131
1. etc. f[10][-3][5][-5] Sol: maxn=n+k (etc. k=10) f[maxn][maxn] 2. etc. f[-1][10][10] Sol: int zz[200],f[maxn][maxn][maxn]; ...
分类:
编程语言 时间:
2018-08-31 01:25:25
阅读次数:
255
1.什么是变量声明? 答:变量声明确定了一个变量名及该变量可存储数据的类型。在变量声明中可以初始化变量,即给定义的变量赋予一个初始值。 2.请根据如下变量声明回答问题。 int count=0,value,total; final int MAX_VALUE=100; int myVlue=50 a ...
分类:
其他好文 时间:
2018-08-27 14:06:15
阅读次数:
110
1 class FreqStack 2 { 3 public: 4 unordered_map hash; 5 vector stk; 6 int max_times; 7 int times_table[10001]; 8 FreqStack() 9 { 10 ... ...
分类:
其他好文 时间:
2018-08-26 15:44:23
阅读次数:
582
#include #include const int MAX = 1005; using namespace std; typedef struct node{ int x; int pre, next; }Node; //整个例子时间主要用于指向下一个节点的过程,代码:46行,66行 int m... ...
分类:
其他好文 时间:
2018-08-25 18:51:12
阅读次数:
297
1 #include 2 #include 3 #include 4 #include 5 #include 6 #include 7 int max(int a,int b) 8 { 9 return a>b?a:b; 10 } 11 12 int maxDestroy(int* nums, in... ...
分类:
其他好文 时间:
2018-08-23 19:34:25
阅读次数:
119
#define Max 250 #define INF 0x3f3f3f3f int map[Max][Max]; int max_flow(int num,int map[][Max],int source,int sink)//参数含义:结点数量 网络 源点 汇点 { int pre[Max], ...
分类:
其他好文 时间:
2018-08-23 15:43:48
阅读次数:
175
题意:给你n个串,给你每个串在总串中开始的每个位置,问你最小字典序总串。 思路:显然这道题有很多重复填涂的地方,那么这里的时间花费就会特别高。 我们维护一个并查集fa,用fa[i]记录从第i位置开始第一个没填涂的位置,那每次都能跳过涂过的地方。每次填完当前格就去填find(fa[i + 1])。 p ...
分类:
其他好文 时间:
2018-08-22 14:00:53
阅读次数:
206
int n,m; int v[MAX],w[MAX]; int dp[MAX]; bool path[MAX][MAX]; int V; void solve() { memset(dp,0,sizeof(dp)); memset(path,false,sizeof(path)); for(int ... ...
分类:
其他好文 时间:
2018-08-22 00:19:09
阅读次数:
274
1001: 公式题,可以用容斥和隔板法推出来。 #include <iostream> #include <cstdio> #include <cstdlib> using namespace std; const int MAX=3e5+5; const long long mod=9982443 ...
分类:
其他好文 时间:
2018-08-19 20:55:46
阅读次数:
148