
暴搜
Napoleon2004
这个作者很懒,什么都没留下…
展开
-
UVA 225 Golygons - ACM/ICPC World Finals 1993
#include<bits/stdc++.h> using namespace std; int n,l,a,b,ans,pre[5000010],rec[5000010],mp[500][500]; string anss[1000010]; void out(int x){ if(x==0)return; out(pre[x]); anss[ans]+=rec[x]; } i...原创 2018-04-03 10:01:53 · 221 阅读 · 0 评论 -
UVA 10603 Fill
#include<bits/stdc++.h> using namespace std; const int maxn=210; struct node{ int v[3],dist; bool operator<(const node&u)const{ return dist > u.dist; } }; int vis[maxn][maxn],cap[...原创 2018-04-03 10:06:30 · 113 阅读 · 0 评论 -
UVA 1601 The Morning after Halloween - Japan 2007
#include<bits/stdc++.h> using namespace std; struct node{ int x[4],y[4],index; }f[5000000]; struct node2{ int x,y; }tar[4]; int k,head,tail,n,m,a[17][17],b[17][17],c[17][17][5],mp[17][17][17][...原创 2018-04-03 10:07:38 · 348 阅读 · 0 评论 -
UVA 12558 Egyptian Fractions (HARD version)
#include<bits/stdc++.h> using namespace std; map<int,int>mp; const int maxn=100010; long long v[maxn],ans[maxn]; int maxd; int get_first(long long a,long long b){ for(int c=b*1./a-2;;c++)...原创 2018-04-03 10:09:13 · 137 阅读 · 0 评论 -
UVA 11212 Editing a Book
#include<bits/stdc++.h> using namespace std; int n,c[10],maxd; struct node{ int index; int tt[10]; }; void cl(queue<node>&q) { queue<node>emp; swap(emp,q); } queue<n...原创 2018-04-04 10:07:15 · 156 阅读 · 0 评论 -
列车线路 train
#include<bits/stdc++.h> using namespace std; int n,b[510],p[250010],m[250010]; int a[510][510],ans[510][510]; void bfs(int start){ int i,h=0,t=1; memset(b,0x3f,sizeof(b)); p[1]=start; m[1]=0...原创 2018-04-23 22:28:41 · 713 阅读 · 0 评论 -
HDU 4474
#include<bits/stdc++.h> using namespace std; struct node{ int p,s,next; }q[1000000]; int k,t,n,m,a[10]; bool b[10],c[1000000]; void out(int num){ if(num==1)return; out(q[num].next); ...原创 2018-07-15 00:01:36 · 265 阅读 · 0 评论 -
2010 提高组 引水入城
只拿了90分,第五个数据点超时 #include<bits/stdc++.h> using namespace std; const int M=510; struct node{ int l,r; }edge[M]; int n,m,a[M][M]; bool b[M],mp[M][M],vis[M][M]; int q[5]={1,0,-1,0},p[5]={0,...原创 2018-07-29 11:05:56 · 252 阅读 · 0 评论