随笔分类 - POJ
摘要:#include<iostream> #include<cstdio> #include<cstring> using namespace std; int data[205][205],link[205],visit[205],count,n,m; bool dfs(int x){ for(int
阅读全文
摘要:#include<iostream> #include<cstring> #include<cstdio> using namespace std; int n,visit[505],edge[505][505],link[505]; bool hungery(int m){ for(int i=1
阅读全文
摘要:#include<iostream> #include<cstdio> #include<cstring> using namespace std; int main(){ int i,j,k,f,v,t,a[100][100],dp[100][100]; scanf("%d%d",&f,&v);
阅读全文
摘要:#include<iostream> #include<algorithm> #include<cstdio> using namespace std; int p,node_cnt,n,m; int a[200005],b[200005],rt[6000005],lc[6000005],rc[60
阅读全文
摘要:#include<iostream> #include<cstdio> #include<cstring> using namespace std; int n,flag,edge[30][30],indegree[30],indgr_tmp[30],ans[30]; void topo(){ in
阅读全文
摘要:#include<iostream> #include<cstring> #include<cstdio> #include<cmath> #include<queue> using namespace std; queue<int>q; int prime[9999],k,pre[9999]; i
阅读全文
摘要:#include<iostream> #include<queue> #include<cstring> #include<cstdio> using namespace std; int n,k,ans; int data[100005]; void bfs(){ memset(data,-1,s
阅读全文
摘要:#include<iostream> #include<cstdio> using namespace std; #define ll long long #include<cmath> void gcd(ll a,ll b,ll&d,ll&x,ll&y){ if(!b){ d = a;x = 1;
阅读全文
摘要:#include<iostream> #include<cstring> #include<cstdio> #include<queue> using namespace std; struct Node{ int x,y; Node(){ x = 0; y = 0; } Node(int a,in
阅读全文
摘要:#include<iostream> #include<cstdio> #include<cstdlib> #include<cstring> #include<cmath> #include<algorithm> using namespace std; #define ll long long
阅读全文
摘要:#include<iostream> #include<cstring> #include<cstdio> #include<algorithm> using namespace std; #define ll long long const ll maxn = 20005; typedef pai
阅读全文
摘要:#include<iostream> #include<cmath> #include<cstdio> using namespace std; int main(){ int t,i,kase; long long n; double ans; scanf("%d",&t); kase = 1;
阅读全文
摘要:#include<iostream> #include<cstdio> using namespace std; int main(){ int t,i,kase; long long n,data[50]; data[1] = 2; data[2] = 3; for(i=3;i<=45;i++){
阅读全文
摘要:#include<iostream> #include<cstring> #include<cstdio> using namespace std; int data[30][30]; void yanghui(){ int i,j; for(i=0;i<=26;i++){ for(j=0;j<=i
阅读全文
摘要:#include<iostream> #include<cstring> #include<cstdio> using namespace std; int main(){ int i,t,w,a[25],data[25],ans[25],dd,len,count; bool flag; scanf
阅读全文
摘要:#include<iostream> #include<cstdio> using namespace std; #define ll long long ll m,a,b,k[10005]; ll get_ans(ll n){ ll i,tmp = 0; for(i=1;i<n;i++) tmp
阅读全文
摘要:#include<iostream> #include<cstdio> #include<cstring> using namespace std; const int maxn = 250005; char data[maxn][2][15]; int number = 0; int degree
阅读全文
摘要:#include<iostream> #include<cstdio> #include<cstring> using namespace std; int k,t,w,h,sx,sy,sum,ex,ey; int idx[45][45],data[45][45],ans[3]; char c[45
阅读全文