又是一道树上做分组背包的题目... 1 #include 2 #include 3 #include 4 using namespace std; 5 6 const int INF = 999999999; 7 const int N = 2001; 8 int value[N]; 9 i...
分类:
其他好文 时间:
2015-08-01 21:48:28
阅读次数:
116
最基本的在DAG上求最短路。 1 #include 2 #include 3 #include 4 using namespace std; 5 6 const int INF = 999999; 7 const int N = 100001; 8 int dp[N]; 9 10 int m...
分类:
其他好文 时间:
2015-08-01 21:48:10
阅读次数:
132
3.电信运营商客服电话using System;using System.Collections.Generic;using System.Linq;using System.Text;namespace ConsoleApplication11{ class Program { ...
分类:
其他好文 时间:
2015-08-01 21:47:03
阅读次数:
115
这个B不难。。。。。。。主要就是题意和细节吧
题意是找到出现次数最多的数的左右端点值,,,一样多的话找区间最小的,,,,一样长的话找最左边的。。。。。。
改的有点乱,,,,慢慢改好的,,,,,
#include
#include
#include
#include
using namespace std;
struct node
{
int c,b;
}a[1...
分类:
其他好文 时间:
2015-08-01 20:37:57
阅读次数:
112
水题 。
#include
using namespace std;
int T,n;
char buf[55];
string s;
bool ok = false;
bool ok1(int a,int b) {
string s1,s2;
s1 = s.substr(0,a);
s2 = s.substr(a,b);
string buf;
if(s...
分类:
其他好文 时间:
2015-08-01 20:36:31
阅读次数:
134
#include #include #include using namespace std;int sx, sy, ex = 3, ey = 4;int dir[8][2] = {1, 1, 1, -1, -1, -1, -1, 1, 0, -1, 1, 0, -1, 0, 0, 1};char ...
分类:
其他好文 时间:
2015-08-01 20:30:34
阅读次数:
117
速度居然#2...目测是因为我没用long long..求∑ lcm(i, j) (1 using namespace std;typedef long long ll;const int maxn = 10000009;const int MOD = 100000009;bool check[m....
分类:
其他好文 时间:
2015-08-01 20:21:57
阅读次数:
129
1 using System; 2 using System.Collections.Generic; 3 using System.Linq; 4 using System.Web; 5 using System.Web.UI; 6 using System.Web.UI.WebCo...
#include
#include
#include
#include
#include
#include
using namespace std;
#define maxn 7500
#define inf 0x3f3f3f3f
int n,m;
int g[maxn][maxn];
int clock;
int low[maxn],pre[maxn];
stacks;
int bc;
vect...
分类:
其他好文 时间:
2015-08-01 19:02:31
阅读次数:
112
??
#include
#include
#include
#define N 1000
#include
using namespace std;
stack str;//字符栈 转化为后缀式
stack num;//数字栈 计算值
char s1[N],s2[N],s3[1000000];
int top;
int com(char x)//比较优先级
{
...
分类:
其他好文 时间:
2015-08-01 19:02:27
阅读次数:
78