久久久青草久久久青草,国产精品xxxx国产喷水亚洲国产精品无码久久一区 ,波多野结衣AV无码久久一区http://www.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://www.shnenglu.com/MiYu/archive/2010/10/28/131663.htmlMiYuMiYuThu, 28 Oct 2010 13:17:00 GMThttp://www.shnenglu.com/MiYu/archive/2010/10/28/131663.htmlhttp://www.shnenglu.com/MiYu/comments/131663.htmlhttp://www.shnenglu.com/MiYu/archive/2010/10/28/131663.html#Feedback0http://www.shnenglu.com/MiYu/comments/commentRss/131663.htmlhttp://www.shnenglu.com/MiYu/services/trackbacks/131663.html

 

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

 

題目地址:

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

題目分析:

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

代碼如下 :

代碼
/*
Mail to   : miyubai@gamil.com
My Blog   : www.baiyun.me
Link      : 
http://www.cnblogs.com/MiYu  || http://www.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ā)表評(píng)論
]]>
HDOJ 1999 HDU 1999 不可摸數(shù) ACM 1999 IN HDU http://www.shnenglu.com/MiYu/archive/2010/08/15/123511.htmlMiYuMiYuSun, 15 Aug 2010 10:00:00 GMThttp://www.shnenglu.com/MiYu/archive/2010/08/15/123511.htmlhttp://www.shnenglu.com/MiYu/comments/123511.htmlhttp://www.shnenglu.com/MiYu/archive/2010/08/15/123511.html#Feedback2http://www.shnenglu.com/MiYu/comments/commentRss/123511.htmlhttp://www.shnenglu.com/MiYu/services/trackbacks/123511.htmlMiYu原創(chuàng), 轉(zhuǎn)帖請(qǐng)注明 : 轉(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,則稱(chēng)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)的篩選法。求出每個(gè)數(shù)的因子和,

然后看因子和是否在1000以?xún)?nèi),是的話就證明等于因子和的這個(gè)數(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ā)表評(píng)論
]]>
HDOJ 2036 HDU 2036 改革春風(fēng)吹滿地 ACM 2036 IN HDU http://www.shnenglu.com/MiYu/archive/2010/08/12/123159.htmlMiYuMiYuThu, 12 Aug 2010 03:19:00 GMThttp://www.shnenglu.com/MiYu/archive/2010/08/12/123159.htmlhttp://www.shnenglu.com/MiYu/comments/123159.htmlhttp://www.shnenglu.com/MiYu/archive/2010/08/12/123159.html#Feedback0http://www.shnenglu.com/MiYu/comments/commentRss/123159.htmlhttp://www.shnenglu.com/MiYu/services/trackbacks/123159.htmlMiYu原創(chuàng), 轉(zhuǎn)帖請(qǐng)注明 : 轉(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)吹滿地,
不會(huì)AC沒(méi)關(guān)系;
實(shí)在不行回老家,
還有一畝三分地。
謝謝
!(樂(lè)隊(duì)奏樂(lè))”

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

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

Output
對(duì)于每個(gè)測(cè)試實(shí)例,請(qǐng)輸出對(duì)應(yīng)的多邊形面積,結(jié)果精確到小數(shù)點(diǎn)后一位小數(shù)。
每個(gè)實(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ā)表評(píng)論
]]>
HDOJ 1969 HDU 1969 Pie ACM 1969 IN HDU http://www.shnenglu.com/MiYu/archive/2010/08/11/123065.htmlMiYuMiYuWed, 11 Aug 2010 06:37:00 GMThttp://www.shnenglu.com/MiYu/archive/2010/08/11/123065.htmlhttp://www.shnenglu.com/MiYu/comments/123065.htmlhttp://www.shnenglu.com/MiYu/archive/2010/08/11/123065.html#Feedback0http://www.shnenglu.com/MiYu/comments/commentRss/123065.htmlhttp://www.shnenglu.com/MiYu/services/trackbacks/123065.htmlMiYu原創(chuàng), 轉(zhuǎn)帖請(qǐng)注明 : 轉(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個(gè)餡餅,有f個(gè)朋友,接下來(lái)是n個(gè)餡餅的半徑。然后是分餡餅了,
注意咯自己也要,大家都要一樣大,形狀沒(méi)什么要求,但都要是一整塊的那種,也就是說(shuō)不能從兩個(gè)餅中
各割一小塊來(lái)湊一塊,像面積為10的和6的兩塊餅(餅的厚度是1,所以面積和體積相等),
如果每人分到面積為5,則10分兩塊,6切成5,夠分3個(gè)人,如果每人6,則只能分兩個(gè)了!
題目要求我們分到的餅盡可能的大!

只要注意精度問(wèn)題就可以了,一般WA 都是精度問(wèn)題.

代碼如下:
#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ā)表評(píng)論
]]>
HDOJ 2899 HDU 2899 Strange fuction ACM 2899 IN HDU http://www.shnenglu.com/MiYu/archive/2010/08/11/123060.htmlMiYuMiYuWed, 11 Aug 2010 05:51:00 GMThttp://www.shnenglu.com/MiYu/archive/2010/08/11/123060.htmlhttp://www.shnenglu.com/MiYu/comments/123060.htmlhttp://www.shnenglu.com/MiYu/archive/2010/08/11/123060.html#Feedback0http://www.shnenglu.com/MiYu/comments/commentRss/123060.htmlhttp://www.shnenglu.com/MiYu/services/trackbacks/123060.htmlMiYu原創(chuàng), 轉(zhuǎn)帖請(qǐng)注明 : 轉(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é)題, 需要微積分的知識(shí)分析題目...........我承認(rèn)....我數(shù)學(xué)沒(méi)怎么學(xué)好..........
分析出來(lái)使用2分搜索就可以了..........

代碼如下:
#include <iostream>
#include 
<cmath>
using namespace std;
#define POW(x) ( (x) * (x) )
#define POW3(x) ( POW(x) * (x) )
MiYu原創(chuàng), 轉(zhuǎn)帖請(qǐng)注明 : 轉(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ā)表評(píng)論
]]>
HDOJ HDU 2073 無(wú)限的路 ACM 2073 IN HDU http://www.shnenglu.com/MiYu/archive/2010/08/07/122532.htmlMiYuMiYuSat, 07 Aug 2010 08:25:00 GMThttp://www.shnenglu.com/MiYu/archive/2010/08/07/122532.htmlhttp://www.shnenglu.com/MiYu/comments/122532.htmlhttp://www.shnenglu.com/MiYu/archive/2010/08/07/122532.html#Feedback0http://www.shnenglu.com/MiYu/comments/commentRss/122532.htmlhttp://www.shnenglu.com/MiYu/services/trackbacks/122532.htmlMiYu原創(chuàng), 轉(zhuǎn)帖請(qǐng)注明 : 轉(zhuǎn)載自 ______________白白の屋

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




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

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

Output
對(duì)于每組數(shù)據(jù),輸出兩點(diǎn)(x1,y1),(x2,y2)之間的折線距離。注意輸出結(jié)果精確到小數(shù)點(diǎn)后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

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

代碼如下:
MiYu原創(chuàng), 轉(zhuǎn)帖請(qǐng)注明 : 轉(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點(diǎn)在同一直線上 
            double len = sqrt ( 2.0 ) * ( x + x1 - x0 + y * ( y - 1.0 ) / 2.0 - x * ( x + 1.0 ) / 2.0 );  //所有 斜率為1的直線的長(zhǎng)度和 
            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ā)表評(píng)論
]]>
久久这里只精品国产99热| 久久久亚洲欧洲日产国码aⅴ| 久久久久99精品成人片| 国产女人aaa级久久久级| 久久精品国产2020| 久久综合综合久久综合| 丰满少妇人妻久久久久久| 一本久久综合亚洲鲁鲁五月天| 国产精品久久久久jk制服| 一本久久久久久久| 久久精品蜜芽亚洲国产AV| 久久人人爽人人爽人人片AV麻豆 | 精品国产乱码久久久久久呢| 久久综合亚洲鲁鲁五月天| 国内精品九九久久久精品| 久久久黄片| 久久婷婷国产综合精品| 久久乐国产综合亚洲精品| 久久久久人妻一区精品性色av| 亚洲欧洲精品成人久久曰影片| 色综合合久久天天综合绕视看| 久久夜色精品国产网站| 精品综合久久久久久98| 久久精品国产亚洲麻豆| 久久精品亚洲中文字幕无码麻豆| 国内精品久久久久久久久电影网| 久久久久国色AV免费观看| 亚洲va中文字幕无码久久| 国产精品欧美亚洲韩国日本久久| 久久精品国产99国产精偷| 国产综合久久久久久鬼色| 亚洲国产成人精品女人久久久 | 久久亚洲精品无码aⅴ大香| 久久久WWW成人免费毛片| 丁香久久婷婷国产午夜视频| 亚洲国产另类久久久精品小说 | 久久天天躁夜夜躁狠狠| 91精品国产色综久久| 精品乱码久久久久久久| www.久久热.com| 久久人人爽人人爽人人片av高请|