摘要: 不能在sqlsever自增字段中插入值,如果作此操作就会出现如下警告。Cannot insert explicit value for identity column in table 't' when identity_insert is set to OFF.这个错误消息提示我们,如果向 SQL... 阅读全文
posted @ 2015-04-14 16:47 forevermemory 阅读(523) 评论(0) 推荐(0) 编辑
摘要: DescriptionEvery time it rains on Farmer John's fields, a pond forms over Bessie's favorite clover patch. This means that the clover is covered by water for awhile and takes quite a long time to regrow. Thus, Farmer John has built a set of drainage ditches so that Bessie's clover patch i 阅读全文
posted @ 2013-10-11 17:48 forevermemory 阅读(217) 评论(0) 推荐(0) 编辑
摘要: DescriptionEvery cow's dream is to become the most popular cow in the herd. In a herd of N (1 1,那么不存在否则输出该点的强连通分量点的个数。#include#include#include#include#includeusing namespace std;int visit[10001];int dfn[10001],low[10001],head[10001],n,m,ret,ans,ti;int flag[10001];stack st;vector v[10001];int du[ 阅读全文
posted @ 2013-10-11 11:15 forevermemory 阅读(285) 评论(0) 推荐(0) 编辑
摘要: We never paid any heed to the ancient prophecies, like fools we clung to the old hatreds, and fought as we had for generations. Until one day the sky rained fire, and a new enemy came upon us. We stand now upon the brink of destruction, for the Reign of Chaos has come at last.Thrall, the warchief of 阅读全文
posted @ 2013-10-11 03:03 forevermemory 阅读(560) 评论(0) 推荐(0) 编辑
摘要: Problem DescriptionHappy New Term! As having become a junior, xiaoA recognizes that there is not much time for her to AC problems, because there are some other things for her to do, which makes her nearly mad. What's more, her boss tells her that for some sets of duties, she must choose at least 阅读全文
posted @ 2013-10-07 18:56 forevermemory 阅读(426) 评论(0) 推荐(0) 编辑
摘要: #include #include #include using namespace std; int p[105][105]; int pp[105][105]; int des[105]; int sum[12][10005]; int n,v,g; int maxi(int a,int b) { return ab?a:b; } int main() { int i,j,k,l,a,b,c; while(scanf("%d %d %d",&n,&v,&g)!=EOF) { memset(p,0,sizeof(p)); memset(pp,0,sizeof(pp)); memset(des,0,sizeof(des)); memset(sum,-1,sizeof(sum)); for(i=0;i=v;i++) sum[0][i]=0; for(i=0;in;i++) { scanf("%d %d %d" 阅读全文
posted @ 2013-10-07 11:39 forevermemory 阅读(209) 评论(0) 推荐(0) 编辑
摘要: Description 殷犇有很多队员。他们都认为自己是最强的,于是,一场比赛开始了~ 于是安叔主办了一场比赛,比赛有n个题目,每个题目都有一个价值Pi和相对能力消耗Wi,但是有些题目因为太坑不能同时做出来,并且坑题具有传递性。(a和b一起做会坑、b和c会坑则a和c也会坑) ACM队员们想知道,于是他们想知道在能力范围内,它们最多可以作出多少价值的题目。 聪明的你,告诉我,能帮帮他们吗?Input 第1行两个整数,n,Wmax,k(0#include#include#include#includeusingnamespacestd;intfather[1005];intpri[1005];in 阅读全文
posted @ 2013-10-07 00:32 forevermemory 阅读(189) 评论(0) 推荐(0) 编辑
摘要: Description CX是要赶去上课,为了不迟到必须要以最短的路径到达教室,同时CX希望经过的路上能看到的学妹越多越好。现在把地图抽象成一个无向图,CX从1点出发,教室在N号点,告诉每个点上学妹的数量,每条边的长度。请你求出CX以最短路径赶到教室最多能看到多少学妹。Input 多组输入数据(最多20组),输入到文件结束。 每组数据第一行两个正整数N,M其中N代表点的个数(2#include#include#define MAX 10000000using namespace std;int p[1005][1005];int flag[1005][1005];int visit[1005] 阅读全文
posted @ 2013-10-06 17:38 forevermemory 阅读(291) 评论(0) 推荐(0) 编辑
摘要: DescriptionOnce, in one kingdom, there was a queen and that queen was expecting a baby. The queen prayed: ``If my child was a son and if only he was a sound king.'' After nine months her child was born, and indeed, she gave birth to a nice son. Unfortunately, as it used to happen in royal fa 阅读全文
posted @ 2013-10-05 21:23 forevermemory 阅读(237) 评论(0) 推荐(0) 编辑
摘要: DescriptionYou are given n closed, integer intervals [ai, bi] and n integers c1, ..., cn. Write a program that: reads the number of intervals, their end points and integers c1, ..., cn from the standard input, computes the minimal size of a set Z of integers which has at least ci common elements wit 阅读全文
posted @ 2013-10-05 13:26 forevermemory 阅读(249) 评论(0) 推荐(0) 编辑