uvj
xx_zzj
这个作者很懒,什么都没留下…
展开
-
Quadtrees UVA - 297
#include <iostream>#include <cstring>#include <cstdio>#include <iostream>#include <iomanip>#include <string>#include <cstring>#include <cstdlib>转载 2018-05-13 21:48:51 · 153 阅读 · 0 评论 -
D - Cutting Sticks UVA - 10003
#include <cstdio>#include <iostream>#include <cstring>#include <cmath>#include <algorithm>#include <stack>#include <queue>#include <vector&g转载 2018-08-06 15:41:54 · 156 阅读 · 0 评论 -
F - Slim Span UVA - 1395
#include <stdio.h>#include <math.h>#include<algorithm>#include<string>#include<cstdlib>#include<cctype>#include<cstring>#include<iostream>原创 2018-08-14 16:40:27 · 176 阅读 · 0 评论 -
B - Knight Moves UVA - 439
#include <cstdio>#include <cmath>using namespace std;typedef long long ll;//走的是日字,以为任意两点间走六步即可到达,所以只要超过六步就停止,深度优先搜索会产生很多分支,所以一定要设置边界否则一定超时int num[9][9];int comun[8][2]= {{1,-2},{-1,-...原创 2018-08-16 17:25:14 · 237 阅读 · 0 评论 -
B - Threesome UVALive - 8264
//三重循环即可,有时暴力也是一种很好的方法,不用光去想找用哪个算法实现#include<stdio.h>#include<algorithm>#include<iostream>#include<string.h>#include<math.h>#include<cstdlib>using names...原创 2018-08-27 09:45:24 · 438 阅读 · 0 评论 -
D - Network Report UVALive - 8266
给你几个点和几条边,让你求任意两点之间的最短路,并且自己到达自己的不算,求出路径长度不同的分别有几条#include<stdio.h>#include<algorithm>#include<iostream>#include<string.h>#include<math.h>#include<cstdlib>u...原创 2018-08-27 10:24:34 · 199 阅读 · 0 评论 -
NCPC 2015 Problem D Disastrous Downtime Problem ID: downtime
#include <cassert>#include <iostream>#include <vector>#include<stdio.h>using namespace std;int sweep[101005];int main(){ int n,k; scanf("%d%d",&n,&k); ...转载 2018-07-31 09:37:10 · 229 阅读 · 0 评论 -
uva572
#include <iostream>#include <cstring>#include <cstdio>#include <iostream>#include <iomanip>#include <string>#include <cstring>#include <cstdlib>原创 2018-05-14 19:47:50 · 164 阅读 · 0 评论 -
uva10305
#include <bits/stdc++.h>using namespace std;const int maxn=119;vector<int>vec[maxn];int have[maxn];int c[maxn];int n,m;int out[maxn];int t=0;void bfs(int k){ have[k]=1; for(vector<...转载 2018-05-21 20:01:46 · 247 阅读 · 0 评论 -
uva10129
#include <bits/stdc++.h>using namespace std;int pa[256]={0};//标记边的连通性int used[256]={0};//某字母是否出现过int sed[256]={0};//对于某点的出入度int findset(int x){return pa[x]!=x? pa[x]=findset(pa[x]):x;}int main()...转载 2018-06-29 21:41:33 · 216 阅读 · 0 评论 -
uva725
#include <bits/stdc++.h>using namespace std;bool init(int x,int y){ int num[19]; int t=0; num[t++]=x%10; num[t++]=x/10%10; num[t++]=x/100%10; num[t++]=x/1000%10; num[t++]=x/...原创 2018-06-30 09:02:52 · 340 阅读 · 0 评论 -
uva 140 注释超多
HomeProblemStatusContestUserGroupForumArticleLogoutzhangzhenjun SubmitFavoriteSubmissionsLeaderboarduDebugTime limit3000 msOSLinuxResultTimeAccepted3 min agoTime limit exceeded6 min agoTime limit exc...转载 2018-07-08 14:32:29 · 216 阅读 · 0 评论 -
uva129
#include <bits/stdc++.h>using namespace std;int n,L;int cnt=0;int s[90]={0};int dfs(int cur){ if(cnt++==n)//每次出现一个hard,就加一。 {int grap=0; for(int i=0; i<cur; i++) { ...转载 2018-07-06 16:28:21 · 300 阅读 · 0 评论