无向图的最小环:从某个点出发走回自己的最短路径,路径上至少有三个点搜索做法:View Code 1 //PKU 1734 无向图的最小环,搜索做法 2 #include 3 #include 4 #include 5 using namespace std; 6 const int N = 110... Read More
posted @ 2011-11-10 22:06 Because Of You Views(1624) Comments(1) Diggs(1) Edit
开始有点小郁闷,原因是编译器坏了,囧~View Code 1 #include<stdio.h> 2 #include<math.h> 3 const double eps = 1e-9; 4 double p[10010]; 5 int n,k; 6 int solve(double x) 7 { 8 int ans=0; 9 for(int i=0;i<n;i++) 10 ans+=int(p[i]/x); 11 return ans;12 }13 int main()14 {15 while(scanf("%d%d",&n... Read More
posted @ 2011-11-10 09:27 Because Of You Views(355) Comments(0) Diggs(0) Edit