摘要:
#include#include#define N 1100int dp[N];int main() {int n,t,m,a[N],b[N],i,j,v;scanf("%d",&t);while(t--) {scanf("%d%d",&n,&v);for(i=1;i=b[i];j--)if(dp[... 阅读全文
摘要:
#include#include#include//只存在一个连通分量#includeusing namespace std;#define N 11000#define NN 110000struct node {//链表实现int v,next;}bian[NN];int sta[N];//数组... 阅读全文
摘要:
#include#include#include#include#include#includeusing namespace std;#define inf 1000000000#define N 2100vectorh[N];//stackq;///int dfn[N],low[N],index... 阅读全文