亚洲人成无码网站久久99热国产,精品久久久久久无码国产,久久久久久噜噜精品免费直播http://m.shnenglu.com/MiYu/category/14450.html ______________白白の屋zh-cnThu, 28 Oct 2010 22:24:09 GMTThu, 28 Oct 2010 22:24:09 GMT60HDU 1098 HDOJ 1098 Ignatius's puzzle ACM 1098 IN HDUhttp://m.shnenglu.com/MiYu/archive/2010/10/28/131663.htmlMiYuMiYuThu, 28 Oct 2010 13:17:00 GMThttp://m.shnenglu.com/MiYu/archive/2010/10/28/131663.htmlhttp://m.shnenglu.com/MiYu/comments/131663.htmlhttp://m.shnenglu.com/MiYu/archive/2010/10/28/131663.html#Feedback0http://m.shnenglu.com/MiYu/comments/commentRss/131663.htmlhttp://m.shnenglu.com/MiYu/services/trackbacks/131663.html

 

MiYu原創(chuàng), 轉(zhuǎn)帖請注明 : 轉(zhuǎn)載自 ______________白白の屋       

 

題目地址:

     http://acm.hdu.edu.cn/showproblem.php?pid=1098

題目分析:

     純粹的數(shù)學(xué)題, 數(shù)學(xué)歸納法的 應(yīng)用  , 最后 歸納得出  原題等價與 18 + k*a 是否能被65整除.

代碼如下 :

代碼
/*
Mail to   : miyubai@gamil.com
My Blog   : www.baiyun.me
Link      : 
http://www.cnblogs.com/MiYu  || http://m.shnenglu.com/MiYu
Author By : MiYu
Test      : 1
Complier  : g++ mingw32-3.4.2
Program   : HDU_1098
Doc Name  : Ignatius's puzzle
*/
//#pragma warning( disable:4789 )
#include <iostream>
#include 
<fstream>
#include 
<sstream>
#include 
<algorithm>
#include 
<string>
#include 
<set>
#include 
<map>
#include 
<utility>
#include 
<queue>
#include 
<stack>
#include 
<list>
#include 
<vector>
#include 
<cstdio>
#include 
<cstdlib>
#include 
<cstring>
#include 
<cmath>
#include 
<ctime>
using namespace std;
inline 
bool scan_d(int &num)
{
        
char in;bool IsN=false;
        
in=getchar();
        
if(in==EOF) return false;
        
while(in!='-'&&(in<'0'||in>'9')) in=getchar();
        
if(in=='-'){ IsN=true;num=0;}
        
else num=in-'0';
        
while(in=getchar(),in>='0'&&in<='9'){
                num
*=10,num+=in-'0';
        }
        
if(IsN) num=-num;
        
return true;
}
int main ()
{
    
int N;
    
while ( scan_d ( N ) ) {
        
if ( N % 65 == 0 )
            puts ( 
"no" );
        
else {
            
int i;
            
for ( i = 0; i < 65++ i ) {
                
if ( ( i * N + 18 ) % 65 == 0 ) {
                    printf ( 
"%d\n", i );
                    
break;
                }
            }
            
if ( i == 65 ) puts ( "no" );
        }
    }
    
return 0;
}

 



MiYu 2010-10-28 21:17 發(fā)表評論
]]>
HDOJ 1999 HDU 1999 不可摸數(shù) ACM 1999 IN HDU http://m.shnenglu.com/MiYu/archive/2010/08/15/123511.htmlMiYuMiYuSun, 15 Aug 2010 10:00:00 GMThttp://m.shnenglu.com/MiYu/archive/2010/08/15/123511.htmlhttp://m.shnenglu.com/MiYu/comments/123511.htmlhttp://m.shnenglu.com/MiYu/archive/2010/08/15/123511.html#Feedback2http://m.shnenglu.com/MiYu/comments/commentRss/123511.htmlhttp://m.shnenglu.com/MiYu/services/trackbacks/123511.htmlMiYu原創(chuàng), 轉(zhuǎn)帖請注明 : 轉(zhuǎn)載自 ______________白白の屋

題目地址:
         http://acm.hdu.edu.cn/showproblem.php?pid=1999
題目描述:
不可摸數(shù)

Time Limit: 
2000/1000 MS (Java/Others)    Memory Limit: 65536/32768 K (Java/Others)
Total Submission(s): 
2613    Accepted Submission(s): 694


Problem Description
s(n)是正整數(shù)n的真因子之和,即小于n且整除n的因子和.例如s(
12)=1+2+3+4+6=16.如果任何
數(shù)m,s(m)都不等于n,則稱n為不可摸數(shù).
 

Input
包含多組數(shù)據(jù),首先輸入T,表示有T組數(shù)據(jù).每組數(shù)據(jù)1行給出n(
2<=n<=1000)是整數(shù)。
 

Output
如果n是不可摸數(shù),輸出yes,否則輸出no
 

Sample Input
3
2
5
8
 

Sample Output
yes
yes
no

題目分析:
         標(biāo)準(zhǔn)的篩選法。求出每個數(shù)的因子和,

然后看因子和是否在1000以內(nèi),是的話就證明等于因子和的這個數(shù)是不可摸數(shù)。

代碼如下: (  奮斗哥代碼    0rz................... )
#include <iostream>
#include 
<string.h>
#include 
<cmath>
using namespace std;
 
int sum[1000001], sign[1001];
int main()
{
    
int nCases, num;
    scanf(
"%d"&nCases);
    
for(int i = 1; i <= 500000++i)
        
for(int j = 2*i; j <= 1000000; j += i)
            sum[j] 
+= i;
    
for(int i = 1; i <= 1000000++i)
        
if(sum[i] < 1000)
            sign[sum[i]] 
= 1;
 
    
while(nCases--)
    {
        scanf(
"%d"&num);
        
if(sign[num])
            printf(
"no\n");
        
else
            printf(
"yes\n");
    }
    
return 0;
}


MiYu 2010-08-15 18:00 發(fā)表評論
]]>
HDOJ 2036 HDU 2036 改革春風(fēng)吹滿地 ACM 2036 IN HDU http://m.shnenglu.com/MiYu/archive/2010/08/12/123159.htmlMiYuMiYuThu, 12 Aug 2010 03:19:00 GMThttp://m.shnenglu.com/MiYu/archive/2010/08/12/123159.htmlhttp://m.shnenglu.com/MiYu/comments/123159.htmlhttp://m.shnenglu.com/MiYu/archive/2010/08/12/123159.html#Feedback0http://m.shnenglu.com/MiYu/comments/commentRss/123159.htmlhttp://m.shnenglu.com/MiYu/services/trackbacks/123159.htmlMiYu原創(chuàng), 轉(zhuǎn)帖請注明 : 轉(zhuǎn)載自 ______________白白の屋

題目地址:
         http://acm.hdu.edu.cn/showproblem.php?pid=2036
題目描述:
改革春風(fēng)吹滿地

Time Limit: 
2000/1000 MS (Java/Others)    Memory Limit: 65536/32768 K (Java/Others)
Total Submission(s): 
5623    Accepted Submission(s): 2763


Problem Description
“ 改革春風(fēng)吹滿地,
不會AC沒關(guān)系;
實在不行回老家,
還有一畝三分地。
謝謝
!(樂隊奏樂)”

話說部分學(xué)生心態(tài)極好,每天就知道游戲,這次考試如此簡單的題目,也是云里霧里,而且,還竟然來這么幾句打油詩。
好呀,老師的責(zé)任就是幫你解決問題,既然想種田,那就分你一塊。
這塊田位于浙江省溫州市蒼南縣靈溪鎮(zhèn)林家鋪子村,多邊形形狀的一塊地,原本是linle 的,現(xiàn)在就準(zhǔn)備送給你了。不過,任何事情都沒有那么簡單,你必須首先告訴我這塊地到底有多少面積,如果回答正確才能真正得到這塊地。
發(fā)愁了吧?就是要讓你知道,種地也是需要AC知識的!以后還是好好練吧
 

Input
輸入數(shù)據(jù)包含多個測試實例,每個測試實例占一行,每行的開始是一個整數(shù)n(
3<=n<=100),它表示多邊形的邊數(shù)(當(dāng)然也是頂點數(shù)),然后是按照逆時針順序給出的n個頂點的坐標(biāo)(x1, y1, x2, y2 xn, yn),為了簡化問題,這里的所有坐標(biāo)都用整數(shù)表示。
輸入數(shù)據(jù)中所有的整數(shù)都在32位整數(shù)范圍內(nèi),n
=0表示數(shù)據(jù)的結(jié)束,不做處理。
 

Output
對于每個測試實例,請輸出對應(yīng)的多邊形面積,結(jié)果精確到小數(shù)點后一位小數(shù)。
每個實例的輸出占一行。
 

Sample Input
3 0 0 1 0 0 1
4 1 0 0 1 -1 0 0 -1
0
 

Sample Output
0.5
2.0

題目分析:
模板題. 直接用 多邊形面積公式 :  S = 1/2 * abs( ∑(xiyi+1 – xi+1yi) )

代碼如下:
#include <iostream>
#include 
<cmath>
using namespace std;
typedef 
struct point{
 
int x, y;
}point;
point polygon[
101];

double areaGmty ( int num )
{
       
double area = 0;
       
for ( int i = 0; i < num; ++ i )
       {
              area 
+= ( polygon[i].x * polygon[(i+1)%num].y ) - (polygon[(i+1)%num].x * polygon[i].y);
       }
       
return area;

int main ()
{
    
int N;
    
while ( scanf ( "%d",&N ), N )
    {
          
for ( int i = 0; i != N; ++ i )
          {
                scanf ( 
"%d%d"&polygon[i].x,&polygon[i].y ); 
          } 
          
double area = areaGmty ( N ) / 2.0;
          printf ( 
"%.1lf\n",area );
    }
    
return 0



MiYu 2010-08-12 11:19 發(fā)表評論
]]>
HDOJ 1969 HDU 1969 Pie ACM 1969 IN HDU http://m.shnenglu.com/MiYu/archive/2010/08/11/123065.htmlMiYuMiYuWed, 11 Aug 2010 06:37:00 GMThttp://m.shnenglu.com/MiYu/archive/2010/08/11/123065.htmlhttp://m.shnenglu.com/MiYu/comments/123065.htmlhttp://m.shnenglu.com/MiYu/archive/2010/08/11/123065.html#Feedback0http://m.shnenglu.com/MiYu/comments/commentRss/123065.htmlhttp://m.shnenglu.com/MiYu/services/trackbacks/123065.htmlMiYu原創(chuàng), 轉(zhuǎn)帖請注明 : 轉(zhuǎn)載自 ______________白白の屋

題目地址:
         http://acm.hdu.edu.cn/showproblem.php?pid=1969
題目描述:
Pie

Time Limit: 
5000/1000 MS (Java/Others)    Memory Limit: 65536/32768 K (Java/Others)
Total Submission(s): 
229    Accepted Submission(s): 65


Problem Description
My birthday 
is coming up and traditionally I'm serving pie. Not just one pie, no, I have a number N of them, of various tastes and of various sizes. F of my friends are coming to my party and each of them gets a piece of pie. This should be one piece of one pie, not several small pieces since that looks messy. This piece can be one whole pie though.

My friends are very annoying and 
if one of them gets a bigger piece than the others, they start complaining. Therefore all of them should get equally sized (but not necessarily equally shaped) pieces, even if this leads to some pie getting spoiled (which is better than spoiling the party). Of course, I want a piece of pie for myself too, and that piece should also be of the same size. 

What 
is the largest possible piece size all of us can get? All the pies are cylindrical in shape and they all have the same height 1, but the radii of the pies can be different.
 

Input
One line with a positive integer: the number of test cases. Then 
for each test case:
---One line with two integers N and F with 1 <= N, F <= 10 000: the number of pies and the number of friends.
---One line with N integers ri with 1 <= ri <= 10 000: the radii of the pies.
 

Output
For each test 
case, output one line with the largest possible volume V such that me and my friends can all get a pie piece of size V. The answer should be given as a floating point number with an absolute error of at most 10^(-3).
 

Sample Input
3
3 3
4 3 3
1 24
5
10 5
1 4 2 3 4 5 6 5 4 2
 

Sample Output
25.1327
3.1416
50.2655

題目分析:
2分求解.

題目大意是要辦生日Party,有n個餡餅,有f個朋友,接下來是n個餡餅的半徑。然后是分餡餅了,
注意咯自己也要,大家都要一樣大,形狀沒什么要求,但都要是一整塊的那種,也就是說不能從兩個餅中
各割一小塊來湊一塊,像面積為10的和6的兩塊餅(餅的厚度是1,所以面積和體積相等),
如果每人分到面積為5,則10分兩塊,6切成5,夠分3個人,如果每人6,則只能分兩個了!
題目要求我們分到的餅盡可能的大!

只要注意精度問題就可以了,一般WA 都是精度問題.

代碼如下:
#include <iostream>
#include 
<cmath>
using namespace std;
double a[10005];
int N,f;
double pi = acos ( -1.0 );
bool test ( double x )
{
    
int count = 0;
    
for ( int i = 1; i <= N; ++ i )
    {
        count 
+= int ( a[i] / x );
    }
    
if ( count >= f + 1 )
    {
         
return true;
    }
    
else
    {
         
return false;
    }
}
int main()
{
    
int T;   
    scanf ( 
"%d"&T );
    
while ( T -- )
    {
           
double sum = 0;
           
double rad; 
           scanf(
"%d%d",&N,&f);
           
for ( int i = 1; i <= N; ++ i )
           {
               scanf ( 
"%lf"&rad );
               a[i] 
= rad * rad * pi;
               sum 
+= a[i];
           }
           
double max = sum / ( f + 1 );
           
double l = 0.0;
           
double r = max;
           
double mid = 0.0;
           
while ( r - l > 1e-6 )
           {
                  mid 
= ( l + r ) / 2;
                  
if ( test ( mid ) )
                  {
                       l 
= mid;
                  }
                  
else
                  {
                       r 
= mid;
                  }
           }
           printf(
"%.4lf\n",mid);
    }
    
return 0;
}



MiYu 2010-08-11 14:37 發(fā)表評論
]]>
HDOJ 2899 HDU 2899 Strange fuction ACM 2899 IN HDU http://m.shnenglu.com/MiYu/archive/2010/08/11/123060.htmlMiYuMiYuWed, 11 Aug 2010 05:51:00 GMThttp://m.shnenglu.com/MiYu/archive/2010/08/11/123060.htmlhttp://m.shnenglu.com/MiYu/comments/123060.htmlhttp://m.shnenglu.com/MiYu/archive/2010/08/11/123060.html#Feedback0http://m.shnenglu.com/MiYu/comments/commentRss/123060.htmlhttp://m.shnenglu.com/MiYu/services/trackbacks/123060.htmlMiYu原創(chuàng), 轉(zhuǎn)帖請注明 : 轉(zhuǎn)載自 ______________白白の屋

題目地址:
         http://acm.hdu.edu.cn/showproblem.php?pid=2899
題目描述:
Strange fuction

Time Limit: 
2000/1000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Others)
Total Submission(s): 
95    Accepted Submission(s): 75


Problem Description
Now, here 
is a fuction:
  F(x) 
= 6 * x^7+8*x^6+7*x^3+5*x^2-y*x (0 <= x <=100)
Can you find the minimum value when x 
is between 0 and 100.
 

Input
The first line of the input contains an integer T(
1<=T<=100) which means the number of test cases. Then T lines follow, each line has only one real numbers Y.(0 < Y <1e10)
 

Output
Just the minimum value (accurate up to 
4 decimal places),when x is between 0 and 100.
 

Sample Input
2
100
200
 

Sample Output
-74.4291
-178.8534

題目分析:
純數(shù)學(xué)題, 需要微積分的知識分析題目...........我承認(rèn)....我數(shù)學(xué)沒怎么學(xué)好..........
分析出來使用2分搜索就可以了..........

代碼如下:
#include <iostream>
#include 
<cmath>
using namespace std;
#define POW(x) ( (x) * (x) )
#define POW3(x) ( POW(x) * (x) )
MiYu原創(chuàng), 轉(zhuǎn)帖請注明 : 轉(zhuǎn)載自 ______________白白の屋


#define
 POW4(x) ( POW(x) * POW(x) )
double y = 0;
double cal ( double n )
{
       
return 8.0 * POW4(n) + 7 * POW3(n) + 2 * POW(n) + 3 * n + 6 ;
}
int main ()
{
    
int T;
    scanf ( 
"%d",&T );
    
while ( T -- )
    {
          scanf ( 
"%lf",&y );
          
if ( cal(0> y || cal(100< y )
          {
               printf ( 
"No solution!\n" );
               
continue;
          }
          
double l = 0.0, r = 100.0,res = 0.0;
          
while ( r - l > 1e-6 )
          {
                
double mid = ( l + r ) / 2.0;
                res 
= cal ( mid );
                
if ( res > y )
                     r 
= mid - 1e-6;    
                
else 
                     l 
= mid + 1e-6;
          }
          printf ( 
"%.4lf\n",( l + r ) / 2.0 ); 
    }
    
return 0
}


MiYu 2010-08-11 13:51 發(fā)表評論
]]>
HDOJ HDU 2073 無限的路 ACM 2073 IN HDU http://m.shnenglu.com/MiYu/archive/2010/08/07/122532.htmlMiYuMiYuSat, 07 Aug 2010 08:25:00 GMThttp://m.shnenglu.com/MiYu/archive/2010/08/07/122532.htmlhttp://m.shnenglu.com/MiYu/comments/122532.htmlhttp://m.shnenglu.com/MiYu/archive/2010/08/07/122532.html#Feedback0http://m.shnenglu.com/MiYu/comments/commentRss/122532.htmlhttp://m.shnenglu.com/MiYu/services/trackbacks/122532.htmlMiYu原創(chuàng), 轉(zhuǎn)帖請注明 : 轉(zhuǎn)載自 ______________白白の屋

題目地址:
         http://acm.hdu.edu.cn/showproblem.php?pid=2073
題目描述:
Problem Description
甜甜從小就喜歡畫圖畫,最近他買了一支智能畫筆,由于剛剛接觸,所以甜甜只會用它來畫直線,于是他就在平面直角坐標(biāo)系中畫出如下的圖形:




甜甜的好朋友蜜蜜發(fā)現(xiàn)上面的圖還是有點規(guī)則的,于是他問甜甜:在你畫的圖中,我給你兩個點,請你算一算連接兩點的折線長度(即沿折線走的路線長度)吧。
 

Input
第一個數(shù)是正整數(shù)N(≤
100)。代表數(shù)據(jù)的組數(shù)。
每組數(shù)據(jù)由四個非負(fù)整數(shù)組成x1,y1,x2,y2;所有的數(shù)都不會大于100。
 

Output
對于每組數(shù)據(jù),輸出兩點(x1,y1),(x2,y2)之間的折線距離。注意輸出結(jié)果精確到小數(shù)點后3位。
 

Sample Input
5
0 0 0 1
0 0 1 0
2 3 3 1
99 99 9 9
5 5 5 5
 

Sample Output
1.000
2.414
10.646
54985.047
0.000

題目分析:
         簡單的數(shù)學(xué)題,  只需要把2點之間的所有線段加進(jìn)去就可以了 .

代碼如下:
MiYu原創(chuàng), 轉(zhuǎn)帖請注明 : 轉(zhuǎn)載自 ______________白白の屋

#include 
<iostream>
#include 
<cmath>
using namespace std;
int main()
{
    
int N, x, x0, x1, y, y0, y1;
    cin 
>> N;
    
while ( N-- )
    {
            cin 
>> x0 >> y0 >> x1 >> y1; 
            
if ( x0 + y0 > x1 + y1 )     
            {
                 x0 
^= x1 ^= x0 ^= x1;
                 y0 
^= y1 ^= y0 ^= y1; 
            }
            x 
= x0 + y0;   
            y 
= x1 + y1; 
            
double line = sqrt ( pow ( x0 - x1 * 1.02 ) + pow ( y0 - y1 * 1.02 ) ); // 2點在同一直線上 
            double len = sqrt ( 2.0 ) * ( x + x1 - x0 + y * ( y - 1.0 ) / 2.0 - x * ( x + 1.0 ) / 2.0 );  //所有 斜率為1的直線的長度和 
            for ( int i = x; i < y; ++ i )
            {
                  len 
+= sqrt ( 2.0 * i * i + 2.0 * i + 1 );  //x 與 y 之間的全部斜線(斜率不為1)相加 
            }
            printf( 
"%.3f\n", x == y ? line : len );
    }
    
return 0;
}


MiYu 2010-08-07 16:25 發(fā)表評論
]]>
久久国产成人精品国产成人亚洲| 久久综合亚洲鲁鲁五月天| 国产成人久久激情91| 国产激情久久久久影院| 国产精品成人久久久| 99久久99这里只有免费的精品| 久久97久久97精品免视看秋霞 | 久久精品视屏| 亚洲中文字幕无码久久精品1| 亚洲综合久久综合激情久久| 亚洲色欲久久久久综合网| 国产成人精品久久一区二区三区| 亚洲国产香蕉人人爽成AV片久久| 69久久精品无码一区二区| 伊人久久五月天| 91精品无码久久久久久五月天| 日日狠狠久久偷偷色综合0| 国产成人精品久久二区二区| 久久久久亚洲精品日久生情| 国产精品热久久毛片| 99久久777色| 日韩精品久久久久久久电影蜜臀| 四虎久久影院| 久久有码中文字幕| 国产精品欧美久久久久无广告 | 国产无套内射久久久国产| 人妻无码αv中文字幕久久| 热久久最新网站获取| 日韩欧美亚洲综合久久影院Ds | 91精品久久久久久无码| 久久午夜无码鲁丝片| 亚洲中文字幕无码久久2017| 中文字幕无码久久久| 伊人久久大香线蕉综合网站| 久久99精品久久久久久水蜜桃| 久久青草国产手机看片福利盒子| 国产91色综合久久免费| 2021久久精品国产99国产精品| 麻豆成人久久精品二区三区免费 | 乱亲女H秽乱长久久久| 丁香色欲久久久久久综合网|