摘要:#include#include#includeusing namespace std;const int MAX_N=10005;vector G[MAX_N]; vector rG[MAX_N];//存储边反向之后的图 vector PostOrder;//存储图的后序遍历 int V,E;bo...
阅读全文
摘要:#include#include#includeusing namespace std;const int MAX_N=10005;vector G[MAX_N]; vector rG[MAX_N];//存储边反向之后的图 vector PostOrder;//存储图的后序遍历 int V,E;bo...
阅读全文
摘要:#include#include#includeusing namespace std;const int MAX_N=100005;const int MAX_V=20005;const int MAX_Q=5005;struct edge{ int from,to,cost;}es[MAX...
阅读全文
摘要:#include#includeusing namespace std;const int MAX_N=100005;templatestruct Stack{private: T a[MAX_N]; int top;public: Stack(){ top=0; } ...
阅读全文
摘要:#include #include using namespace std; const int MAX_N=100005; struct Edge{ int v,id,next; }edge[MAX_N*4]; int a[MAX_N],b[MAX_N],to[MAX_N],k[MAX_N],lca[MAX_N]; int head[MAX_N],opr[MAX_N],fa[MAX_N...
阅读全文
摘要:1.strtok将字符串中的单词用' '分割出来#include#include#include#include#includeusing namespace std;int main(){ /* fstream fin("input.txt",ios::in); fin>>va...
阅读全文
摘要:import java.io.PrintWriter; import java.util.HashMap; import java.util.Map; import java.util.Scanner; import java.util.Iterator; public class Main { static PrintWriter cout = new PrintWriter(Sys...
阅读全文
摘要:import java.io.PrintWriter; import java.util.HashSet; import java.util.Scanner; import java.util.Iterator; public class Main { static PrintWriter cout = new PrintWriter(System.out, true); sta...
阅读全文
摘要:import java.io.PrintWriter;import java.util.HashSet;import java.util.Scanner;public class Main { static PrintWriter cout = new PrintWriter(System.o...
阅读全文