锘??xml version="1.0" encoding="utf-8" standalone="yes"?>欧美jjzz,国产精品久久久久一区二区三区 ,欧美精品aahttp://m.shnenglu.com/MiYu/category/14426.html ______________鐧界櫧銇眿zh-cnThu, 26 Aug 2010 07:03:24 GMTThu, 26 Aug 2010 07:03:24 GMT60HDOJ 1253 HDU 1253 鑳滃埄澶ч冧骸 ACM 1253 IN HDUhttp://m.shnenglu.com/MiYu/archive/2010/08/25/124645.htmlMiYuMiYuWed, 25 Aug 2010 03:30:00 GMThttp://m.shnenglu.com/MiYu/archive/2010/08/25/124645.htmlhttp://m.shnenglu.com/MiYu/comments/124645.htmlhttp://m.shnenglu.com/MiYu/archive/2010/08/25/124645.html#Feedback0http://m.shnenglu.com/MiYu/comments/commentRss/124645.htmlhttp://m.shnenglu.com/MiYu/services/trackbacks/124645.html

MiYu鍘熷垱, 杞笘璇鋒敞鏄?: 杞澆鑷?nbsp;______________鐧界櫧銇眿    

 

 棰樼洰鍦板潃:

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

棰樼洰鎻忚堪:

鑳滃埄澶ч冧骸

Time Limit: 4000/2000 MS (Java/Others)    Memory Limit: 65536/32768 K (Java/Others)
Total Submission(s): 4785    Accepted Submission(s): 1454


Problem Description
Ignatius琚瓟鐜嬫姄璧頒簡,鏈変竴澶╅瓟鐜嬪嚭宸幓浜?榪欏彲鏄疘gnatius閫冧骸鐨勫ソ鏈轟細.

欖旂帇浣忓湪涓涓煄鍫¢噷,鍩庡牎鏄竴涓狝*B*C鐨勭珛鏂逛綋,鍙互琚〃紺烘垚A涓狟*C鐨勭煩闃?鍒氬紑濮婭gnatius琚叧鍦?0,0,0)鐨勪綅緗?紱誨紑鍩庡牎鐨勯棬鍦?A-1,B-1,C-1)鐨勪綅緗?鐜板湪鐭ラ亾欖旂帇灝嗗湪T鍒嗛挓鍚庡洖鍒板煄鍫?Ignatius姣忓垎閽熻兘浠庝竴涓潗鏍囪蛋鍒扮浉閭葷殑鍏釜鍧愭爣涓殑鍏朵腑涓涓?鐜板湪緇欎綘鍩庡牎鐨勫湴鍥?璇蜂綘璁$畻鍑篒gnatius鑳藉惁鍦ㄩ瓟鐜嬪洖鏉ュ墠紱誨紑鍩庡牎(鍙璧板埌鍑哄彛灝辯畻紱誨紑鍩庡牎,濡傛灉璧板埌鍑哄彛鐨勬椂鍊欓瓟鐜嬪垰濂藉洖鏉ヤ篃綆楅冧骸鎴愬姛),濡傛灉鍙互璇瘋緭鍑洪渶瑕佸灝戝垎閽熸墠鑳界寮,濡傛灉涓嶈兘鍒欒緭鍑?1.


 

Input
杈撳叆鏁版嵁鐨勭涓琛屾槸涓涓鏁存暟K,琛ㄦ槑嫻嬭瘯鏁版嵁鐨勬暟閲?姣忕粍嫻嬭瘯鏁版嵁鐨勭涓琛屾槸鍥涗釜姝f暣鏁癆,B,C鍜孴(1<=A,B,C<=50,1<=T<=1000),瀹冧滑鍒嗗埆浠h〃鍩庡牎鐨勫ぇ灝忓拰欖旂帇鍥炴潵鐨勬椂闂?鐒跺悗鏄疉鍧楄緭鍏ユ暟鎹?鍏堟槸絎?鍧?鐒跺悗鏄1鍧?絎?鍧?.....),姣忓潡杈撳叆鏁版嵁鏈塀琛?姣忚鏈塁涓鏁存暟,浠h〃榪峰鐨勫竷灞,鍏朵腑0浠h〃璺?1浠h〃澧?(濡傛灉瀵硅緭鍏ユ弿榪頒笉娓呮,鍙互鍙傝僑ample Input涓殑榪峰鎻忚堪,瀹冭〃紺虹殑灝辨槸涓婂浘涓殑榪峰)

鐗瑰埆娉ㄦ剰:鏈鐨勬祴璇曟暟鎹潪甯稿ぇ,璇蜂嬌鐢╯canf杈撳叆,鎴戜笉鑳戒繚璇佷嬌鐢╟in鑳戒笉瓚呮椂.鍦ㄦ湰OJ涓婅浣跨敤Visual C++鎻愪氦.
 

Output
瀵逛簬姣忕粍嫻嬭瘯鏁版嵁,濡傛灉Ignatius鑳藉鍦ㄩ瓟鐜嬪洖鏉ュ墠紱誨紑鍩庡牎,閭d箞璇瘋緭鍑轟粬鏈灝戦渶瑕佸灝戝垎閽?鍚﹀垯杈撳嚭-1.
 

Sample Input
1 3 3 4 20 0 1 1 1 0 0 1 1 0 1 1 1 1 1 1 1 1 0 0 1 0 1 1 1 0 0 0 0 0 1 1 0 0 1 1 0
 

Sample Output
11
 

 

 棰樼洰鍒嗘瀽:

    棰樼洰鏄緢綆鍗曠殑涓閬揃FS, 浣嗘槸榪欑牬棰樼珶鐒剁籂緇撲簡鎴戜竴鏁村ぉ, 鏅氫笂11鐐圭殑鏃跺欐墠A鎺?YM.  
榪欓鍜?浜岀淮鐭╅樀鐨勪笉鍚岀偣灝辨槸鏈?涓柟鍚? 鍓嶅悗宸﹀彸涓婁笅.  鐒跺悗涓鐩碆FS灝卞彲浠ヤ簡,涓嶉渶瑕佸壀鏋濋兘鑳借繃...........


浠g爜濡備笅:

 /*

MiYu鍘熷垱, 杞笘璇鋒敞鏄?: 杞澆鑷?______________鐧界櫧銇眿

          http://www.cnblog.com/MiYu

Author By : MiYu

Test      : 1

Program   : HDU1253

*/


#include <iostream>

#include <queue>

using namespace std;

int TLE[56][56][56];

const int d[6][3] = { { 0,0,1 },{ 0,0,-1 },{ 0,-1,0 },{ 0,1,0 },{ 1,0,0 },{ -1,0,0 } };

int A, B, C, T, m;

typedef struct pos{

       pos(){ x=y=z=n=0; } 

       void setPos ( int a,int b,int c, int count ){ x=a;y=b;z=c;n=count; }

       bool isEnd () { if ( x==1&&y==1&&z==1 )return true;return false; }

       int x,y,z;  

       int n;

}pos;

pos t,p;

#define CMP(A,B) (A.n < B.n)

typedef class Heap {

public:

        pos h[70000 * 2];

        int n, p, c;

        Heap() {

                n = 0;

        }

        void inline push(pos e) {

                for (p = ++n; p > 1 && CMP(e,h[p>>1]); h[p] = h[p>>1], p >>= 1)

                        ;

                h[p] = e;

        }

        int inline pop(pos &e) {

                if (!n)

                        return 0;

                for (e = h[p = 1], c = 2; c < n

                                && CMP(h[c += (CMP(h[c + 1],h[c]) && c < n - 1)], h[n]);

                                h[p] = h[c], p = c, c <<= 1)

                        ;

                h[p] = h[n--];

                return 1;

        }

}Heap;

Heap WA;

int RE ()

{

    if ( A+B+C-2 > T || TLE[A][B][C] == 0 )

         return -1;

    t.setPos ( A,B,C,0 );

    TLE[A][B][C] = 0;

    WA.push ( t );

    while ( WA.pop(t) ){ 

           if ( t.x+t.y+t.z-2 > T-t.n )

                continue;            

           if ( t.isEnd() )

                return t.n;  

           for ( int i = 0; i != 6; ++ i ){

                 int x = t.x+d[i][0], y=t.y+d[i][1], z=t.z+d[i][2];

                 if ( TLE[ x ][ y ][ z ] != 0 ){

                      TLE[ x ][ y ][ z ] = 0;

                      p.setPos ( x, y, z, t.n+1 ); 

                      if ( p.isEnd() && p.n <= T )

                           return p.n;  

                      if ( p.n <= T )    

                           WA.push ( p );

                 }

           }  

    }

    return -1;

}

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 K;

    scan_d(K);

    while ( K -- ){

           while ( WA.pop(p) ) ;

           memset ( TLE, 0 , sizeof ( TLE ) );

           scan_d(A); scan_d(B); scan_d(C); scan_d(T);

           for ( int i = 1; i <= A; ++ i ){

                 for ( int j = 1; j <= B; ++ j ){

                       for ( int k = 1; k <= C; ++ k ){

                             scan_d(m);

                             TLE[i][j][k] = m == 1 ? 0 : 1; 

                       } 

                 } 

           } 

           TLE[1][1][1] = 1;

           cout << RE () << endl;

    } 

    //system( "pause" );

    return 0;

}


 

 



MiYu 2010-08-25 11:30 鍙戣〃璇勮
]]>
HDOJ 1181 HDU 1181 鍙樺艦璇?ACM 1181 IN HDUhttp://m.shnenglu.com/MiYu/archive/2010/08/25/124643.htmlMiYuMiYuWed, 25 Aug 2010 03:27:00 GMThttp://m.shnenglu.com/MiYu/archive/2010/08/25/124643.htmlhttp://m.shnenglu.com/MiYu/comments/124643.htmlhttp://m.shnenglu.com/MiYu/archive/2010/08/25/124643.html#Feedback0http://m.shnenglu.com/MiYu/comments/commentRss/124643.htmlhttp://m.shnenglu.com/MiYu/services/trackbacks/124643.html

MiYu鍘熷垱, 杞笘璇鋒敞鏄?: 杞澆鑷?nbsp;______________鐧界櫧銇眿    

棰樼洰鍦板潃:

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

棰樼洰鎻忚堪:

浠g爜
鍙樺艦璇?br>
Time Limit: 
2000/1000 MS (Java/Others)    Memory Limit: 131072/65536 K (Java/Others)
Total Submission(s): 
2655    Accepted Submission(s): 863


Problem Description
鍛?.....鍙樺艦璇句笂Harry紕板埌浜嗕竴鐐瑰皬楹葷儲,鍥犱負浠栧茍涓嶅儚Hermione閭f牱鑳藉璁頒綇鎵鏈夌殑鍜掕鑰岄殢鎰忕殑灝嗕竴涓鐞冨彉鎴愬埡鐚粈涔堢殑,浣嗘槸浠栧彂鐜頒簡鍙樺艦鍜掕鐨勪竴涓粺涓瑙勫緥:濡傛灉鍜掕鏄互a寮澶碽緇撳熬鐨勪竴涓崟璇?閭d箞瀹冪殑浣滅敤灝辨伆濂芥槸浣緼鐗╀綋鍙樻垚B鐗╀綋. 
Harry宸茬粡灝嗕粬鎵浼氱殑鎵鏈夊拻璇兘鍒楁垚浜嗕竴涓〃,浠栨兂璁╀綘甯繖璁$畻涓涓嬩粬鏄惁鑳藉畬鎴愯佸笀鐨勪綔涓?灝嗕竴涓狟(ball)鍙樻垚涓涓狹(Mouse),浣犵煡閬?濡傛灉浠栬嚜宸變笉鑳藉畬鎴愮殑璇?浠栧氨鍙ソ鍚慔ermione璇鋒暀,騫朵笖琚揩鍚竴澶у爢濂藉ソ瀛︿範鐨勯亾鐞?
 

Input
嫻嬭瘯鏁版嵁鏈夊緇勩傛瘡緇勬湁澶氳錛屾瘡琛屼竴涓崟璇?浠呭寘鎷皬鍐欏瓧姣?鏄疕arry鎵浼氱殑鎵鏈夊拻璇?鏁板瓧0琛ㄧず涓緇勮緭鍏ョ粨鏉?
 

Output
濡傛灉Harry鍙互瀹屾垚浠栫殑浣滀笟,灝辮緭鍑?/span>"Yes.",鍚﹀垯灝辮緭鍑?/span>"No."(涓嶈蹇界暐浜嗗彞鍙?
 

Sample Input
so
soon
river
goes
them
got
moon
begin
big
0
 

Sample Output
Yes.

 

 

棰樼洰鍒嗘瀽:

姝ら鏄竴涓緢鏍囧噯浜?nbsp;鎼滅儲棰? 鐩存帴鏋氫婦 + 鍥炴函 灝?nbsp;OK浜?nbsp;.

 

浠g爜
/*
MiYu鍘熷垱, 杞笘璇鋒敞鏄?nbsp;: 杞澆鑷?nbsp;______________鐧界櫧銇眿
          
http://m.shnenglu.com/MiYu
Author By : MiYu
Test      :
Program   :
*/

#include
<iostream>
#include
<string>
using namespace std;
struct{
        
char beg;
        
char end;
}M[
101];
bool hash[101],f;
int N;
bool DFS ( char ch )
{
     
if ( f )
        
return true;
     
if( ch == 'm' )
     {
         f 
= true;
         
return true;
     }
     
for ( int i = 0; i < N; ++ i )
         
if ( M[i].beg == ch && !hash[i] )
         {
              hash[i] 
= true;
              DFS ( M[i].end );
              hash[i] 
= false;
         }
     
return false;
}
int main ()
{
    
string str;
    
while ( cin >> str )
    {
            N 
= 0;
            f 
= false;
            memset ( hash, 
0 , sizeof ( hash ) );
            
while ( str != "0" )
            {
                    M[N].beg 
= str[0];
                    M[N].end 
= str[ str.size() - 1 ];
                    N
++;
                    cin 
>> str;
            }
            DFS ( 
'b' );
            puts ( f 
? "Yes." : "No." );
    }
    
return 0;
}

 

 

浠g爜
鍏跺疄榪欓榪樻湁涓縐嶅緢 YD 鐨勮В娉?/span>!!!  鍢垮樋 ................ 
鍏蜂綋鎯呭喌鐪嬩唬鐮?

#include
<iostream>

using namespace std;

char ss[10];

int main(){

    
int flag=1;

    
while(gets(ss)){

        
if (strcmp(ss,"0")==0){

            
if (flag){

                printf(
"Yes.\n");

                flag
=0;

            }

            
else

                printf(
"No.\n");

        }

    }

    
return 0;

}

 

 

MiYu鍘熷垱, 杞笘璇鋒敞鏄?: 杞澆鑷?a >     ______________鐧界櫧銇眿

 



MiYu 2010-08-25 11:27 鍙戣〃璇勮
]]>
HDOJ 1016 HDU 1016 Prime Ring Problem ACM 1016 IN HDUhttp://m.shnenglu.com/MiYu/archive/2010/08/18/123815.htmlMiYuMiYuWed, 18 Aug 2010 04:32:00 GMThttp://m.shnenglu.com/MiYu/archive/2010/08/18/123815.htmlhttp://m.shnenglu.com/MiYu/comments/123815.htmlhttp://m.shnenglu.com/MiYu/archive/2010/08/18/123815.html#Feedback0http://m.shnenglu.com/MiYu/comments/commentRss/123815.htmlhttp://m.shnenglu.com/MiYu/services/trackbacks/123815.html棰樼洰鍦板潃:
http://acm.hdu.edu.cn/showproblem.php?pid=1016
棰樼洰鎻忚堪:

Prime Ring Problem

Time Limit: 4000/2000 MS (Java/Others)    Memory Limit: 65536/32768 K (Java/Others)
Total Submission(s): 6150    Accepted Submission(s): 2745


Problem Description
A ring is compose of n circles as shown in diagram. Put natural number 1, 2, ..., n into each circle separately, and the sum of numbers in two adjacent circles should be a prime.

Note: the number of first circle should always be 1.


Input
n (0 < n < 20).

Output
The output format is shown as sample below. Each row represents a series of circle numbers in the ring beginning from 1 clockwisely and anticlockwisely. The order of numbers must satisfy the above requirements. Print solutions in lexicographical order.

You are to write a program that completes above process.

Print a blank line after each case.

Sample Input
6 8

Sample Output
Case 1: 1 4 3 2 5 6 1 6 5 2 3 4 Case 2: 1 2 3 8 5 6 7 4 1 2 5 8 3 4 7 6 1 4 7 6 5 8 3 2 1 6 7 4 3 8 5 2
棰樼洰鍒嗘瀽:
鍏稿瀷鐨?DFS 棰樼洰, 涓嶉渶瑕?浠涔堝壀鏋? 鐩存帴 絀蜂婦 + 鍥炴函 灝監K浜? 涓嶈繃鍊煎緱涓鎻愮殑鏄?榪欓杈撳嚭寰圔T, 涓鑸殑 鍓嶅悗 杈撳嚭 鍥炶濺 , 絎竴涓洖杞︾敤 if( n == 1 ) 鍥炶濺; 鏉ュ仛PE浜嗗ソ鍑犳, 鏈鍚庣洿鎺ュ湪紼嬪簭鏈鍚?/span> 杈撳嚭2涓洖杞︾绔熺劧灝盇浜? YM鍟?..........
浠g爜濡備笅:
/* MiYu鍘熷垱, 杞笘璇鋒敞鏄?: 杞澆鑷?______________鐧界櫧銇眿 http://m.shnenglu.com/MiYu Author By : MiYu Test : Program : */ #include <iostream> using namespace std; bool prim[25]; int res[25]; bool hash[25]; int N; void setPrim () { memset ( prim, 0, sizeof ( prim ) ); prim[2] = prim[3] = prim[5] = prim[7] = prim[11] = prim[13] = prim[17] = prim[19] = prim[23] = true; } bool DFS ( int num , int n ) { res[n] = num; if ( n > N ) { return false; } if ( n == N - 1 ) { for ( int i = 2; i <= N; ++ i ) { if ( prim[num + i] && prim[ i + 1 ] && !hash[i] ) { res[n+1] = i; for ( int i = 1; i <= N; ++ i ) printf ( i == 1 ? "%d" : " %d",res[i] ); putchar ( '\n' ); } } } for ( int i = 2; i <= N; ++ i ) { if ( prim[ num + i ] && !hash[i] ) { hash[i] = true; DFS ( i, n + 1 ); hash[i] = false; } } return false; } int main () { setPrim (); int ca = 1; while ( cin >> N ) { sizeof ( hash, 0 , sizeof ( hash ) ); printf ( "Case %d:\n",ca++ ); hash[1] = true; DFS ( 1, 1 ); putchar ( '\n' ); } return 0; }



MiYu 2010-08-18 12:32 鍙戣〃璇勮
]]>
HDOJ 1010 HDU 1010 Tempter of the Bone ACM 1010 IN HDUhttp://m.shnenglu.com/MiYu/archive/2010/08/18/123802.htmlMiYuMiYuWed, 18 Aug 2010 02:35:00 GMThttp://m.shnenglu.com/MiYu/archive/2010/08/18/123802.htmlhttp://m.shnenglu.com/MiYu/comments/123802.htmlhttp://m.shnenglu.com/MiYu/archive/2010/08/18/123802.html#Feedback0http://m.shnenglu.com/MiYu/comments/commentRss/123802.htmlhttp://m.shnenglu.com/MiYu/services/trackbacks/123802.html闃呰鍏ㄦ枃

MiYu 2010-08-18 10:35 鍙戣〃璇勮
]]>
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鍘熷垱, 杞笘璇鋒敞鏄?: 杞澆鑷?______________鐧界櫧銇眿

棰樼洰鍦板潃:
         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鍒嗘眰瑙?

棰樼洰澶ф剰鏄鍔炵敓鏃arty錛屾湁n涓楗鹼紝鏈塮涓湅鍙嬶紝鎺ヤ笅鏉ユ槸n涓楗肩殑鍗婂緞銆傜劧鍚庢槸鍒嗛楗間簡錛?br>娉ㄦ剰鍜嚜宸變篃瑕侊紝澶у閮借涓鏍峰ぇ錛屽艦鐘舵病浠涔堣姹傦紝浣嗛兘瑕佹槸涓鏁村潡鐨勯偅縐嶏紝涔熷氨鏄涓嶈兘浠庝袱涓ゼ涓?br>鍚勫壊涓灝忓潡鏉ュ噾涓鍧楋紝鍍忛潰縐負10鐨勫拰6鐨勪袱鍧楅ゼ錛堥ゼ鐨勫帤搴︽槸1錛屾墍浠ラ潰縐拰浣撶Н鐩哥瓑錛夛紝
濡傛灉姣忎漢鍒嗗埌闈㈢Н涓?錛屽垯10鍒嗕袱鍧楋紝6鍒囨垚5錛屽鍒?涓漢錛屽鏋滄瘡浜?錛屽垯鍙兘鍒嗕袱涓簡錛?br>棰樼洰瑕佹眰鎴戜滑鍒嗗埌鐨勯ゼ灝藉彲鑳界殑澶э紒

鍙娉ㄦ剰綺懼害闂灝卞彲浠ヤ簡,涓鑸琖A 閮芥槸綺懼害闂.

浠g爜濡備笅:
#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 鍙戣〃璇勮
]]>
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鍘熷垱, 杞笘璇鋒敞鏄?: 杞澆鑷?______________鐧界櫧銇眿

棰樼洰鍦板潃:
         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

棰樼洰鍒嗘瀽:
綰暟瀛﹂, 闇瑕佸井縐垎鐨勭煡璇嗗垎鏋愰鐩?..........鎴戞壙璁?...鎴戞暟瀛︽病鎬庝箞瀛﹀ソ..........
鍒嗘瀽鍑烘潵浣跨敤2鍒嗘悳绱㈠氨鍙互浜?.........

浠g爜濡備笅:
#include <iostream>
#include 
<cmath>
using namespace std;
#define POW(x) ( (x) * (x) )
#define POW3(x) ( POW(x) * (x) )
MiYu鍘熷垱, 杞笘璇鋒敞鏄?: 杞澆鑷?______________鐧界櫧銇眿


#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 鍙戣〃璇勮
]]>
HDOJ 2199 HDU 2199 Can you solve this equation? ACM 2199 IN HDU http://m.shnenglu.com/MiYu/archive/2010/08/11/123059.htmlMiYuMiYuWed, 11 Aug 2010 05:29:00 GMThttp://m.shnenglu.com/MiYu/archive/2010/08/11/123059.htmlhttp://m.shnenglu.com/MiYu/comments/123059.htmlhttp://m.shnenglu.com/MiYu/archive/2010/08/11/123059.html#Feedback0http://m.shnenglu.com/MiYu/comments/commentRss/123059.htmlhttp://m.shnenglu.com/MiYu/services/trackbacks/123059.htmlMiYu鍘熷垱, 杞笘璇鋒敞鏄?: 杞澆鑷?______________鐧界櫧銇眿

棰樼洰鍦板潃:
         http://acm.hdu.edu.cn/showproblem.php?pid=2199
棰樼洰鎻忚堪:
         
Can you solve this equation?

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


Problem Description
Now,given the equation 
8*x^4 + 7*x^3 + 2*x^2 + 3*+ 6 == Y,can you find its solution between 0 and 100;
Now please 
try your lucky.
 

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 a real number Y (fabs(Y) <= 1e10);
 

Output
For each test 
case, you should just output one real number(accurate up to 4 decimal places),which is the solution of the equation,or “No solution!”,if there is no solution for the equation between 0 and 100.
 

Sample Input
2
100
-4
 

Sample Output
1.6152
No solution
!

棰樼洰鍒嗘瀽:
寰堟槑鏄?榪欐槸涓涓?鍒嗘悳绱㈢殑棰樼洰, 浣嗘槸娉ㄦ剰涓嬮鐩殑鏁版嵁!! 1e10 鐨勫疄鏁?! 鑰屼笖綺懼害鏄姹傚湪 0.0001 . 鎵浠ュ氨綆楁槸2鍒嗘暟鎹噺渚濇棫姣旇緝澶?濡傛灉鐢?br>閫氬父鐨勯掑綊鏂規硶鍚楀緢閬楁喚 , RE浜?............  娌″姙娉? 鍙兘寰幆浜?
涓嬮潰鐨勬槸閫掑綊 RE 鐨勪唬鐮?:
#include <iostream>
#include <cmath>
using namespace std;
#define POW(x) ( (x) * (x) )
#define POW3(x) ( POW(x) * (x) )
#define POW4(x) ( POW(x) * POW(x) )
double y = 0;
bool douEql ( double a,double b )
{
if ( fabs( a - b ) <= 1e-6  )
return  true;
return false;
}
double cal ( double n )
{
return 8.0 * POW4(n) + 7 * POW3(n) + 2 * POW(n) + 3 * n + 6 ;
}
double biSearch ( double l, double r )
{
if ( douEql ( l,r ) )
{
if ( douEql ( y, cal ( l ) ) )
return l;
return -1;
}
double mid = ( l + r ) / 2.0;
if ( douEql ( y, cal ( mid ) ) )
return mid;
else if ( cal ( mid ) > y )
return biSearch ( l,mid - 0.0001 );
else
return biSearch ( mid + 0.0001, r );
}
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 res = biSearch ( 0.0, 100.0 );
if ( res == -1 )
printf ( "No solution!\n" );
else
printf ( "%.4lf\n",res );
}
return 0;
}

AC浠g爜濡備笅:
MiYu鍘熷垱, 杞笘璇鋒敞鏄?: 杞澆鑷?______________鐧界櫧銇眿

#include 
<iostream>
#include 
<cmath>
using namespace std;
#define POW(x) ( (x) * (x) )
#define POW3(x) ( POW(x) * (x) )
#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:29 鍙戣〃璇勮
]]>
青青草原综合久久大伊人导航_色综合久久天天综合_日日噜噜夜夜狠狠久久丁香五月_热久久这里只有精品
  • <ins id="pjuwb"></ins>
    <blockquote id="pjuwb"><pre id="pjuwb"></pre></blockquote>
    <noscript id="pjuwb"></noscript>
          <sup id="pjuwb"><pre id="pjuwb"></pre></sup>
            <dd id="pjuwb"></dd>
            <abbr id="pjuwb"></abbr>
            99视频+国产日韩欧美| 亚洲欧美网站| 亚洲综合导航| 午夜一区在线| 国产欧美日韩综合精品二区| 中文日韩在线视频| 亚洲免费小视频| 国产精品久久久久久久午夜 | 亚洲性图久久| 国产精品丝袜久久久久久app| 亚洲一区二区三区成人在线视频精品| 久久久久久久久综合| 在线国产欧美| 欧美日韩一区自拍| 久久国产黑丝| 亚洲美女免费精品视频在线观看| 午夜久久tv| 一本色道88久久加勒比精品 | 激情成人综合| 国产精品欧美久久| 国产亚洲欧美日韩一区二区| 欧美国产第一页| 欧美一区二区国产| 一本久久综合亚洲鲁鲁| 欧美激情精品久久久久久久变态| 一区二区三区成人| 亚洲激情av在线| 国产日韩1区| 亚洲福利国产精品| 亚洲第一网站免费视频| 亚洲视频图片小说| 一区二区三区色| 久热re这里精品视频在线6| 亚洲欧美精品在线| 欧美激情aaaa| 欧美一二三区精品| 国产精品超碰97尤物18| 欧美不卡一区| 久久亚洲私人国产精品va| 午夜电影亚洲| 欧美理论电影网| 亚洲精品视频啊美女在线直播| 久久久精品国产99久久精品芒果| 亚洲欧洲三级| 国产麻豆综合| 国产精品久久久久久超碰 | 国产欧美日本一区视频| 亚洲三级性片| 亚洲另类视频| 亚洲一区二区影院| 欧美一区二区在线视频| 午夜久久99| 在线亚洲免费| 欧美日韩一区二区视频在线观看| 在线国产日韩| 欧美成年人视频网站| 美女视频黄 久久| 亚洲第一精品夜夜躁人人爽| 欧美二区在线| 亚洲激情网站免费观看| 久久天天躁狠狠躁夜夜av| 国产日韩精品一区二区三区在线| 精品成人国产在线观看男人呻吟| 久久爱www| 亚洲福利视频在线| 另类春色校园亚洲| 欧美日韩综合不卡| 国产亚洲欧洲| 欧美一区在线直播| 午夜精品久久久久久久99樱桃| 国产伦精品一区二区三| 欧美一区午夜精品| 久久精品国产第一区二区三区| 国产有码在线一区二区视频| 136国产福利精品导航| 快she精品国产999| 久久综合网hezyo| 99视频精品全国免费| 亚洲一区二区三区精品视频| 国产亚洲精品成人av久久ww| 老司机午夜精品| 欧美激情一级片一区二区| 国产综合网站| 欧美高清视频www夜色资源网| 蜜臀va亚洲va欧美va天堂| 国产精品极品美女粉嫩高清在线| 午夜精品福利在线观看| 欧美在线欧美在线| 国产精品国产三级国产普通话99| 亚洲一区二区四区| 久久免费精品视频| 一区二区国产日产| 性色av香蕉一区二区| 欧美日韩在线视频观看| 欧美亚洲自偷自偷| 欧美不卡福利| 欧美专区亚洲专区| 欧美激情一区| 欧美主播一区二区三区| 国产精品实拍| 久久国产一区二区| 一二三四社区欧美黄| 国产日韩欧美日韩| 欧美激情一区二区三区蜜桃视频| 欧美视频中文字幕在线| 久久久综合香蕉尹人综合网| 亚洲午夜一区| 国产精品v欧美精品v日韩精品| 欧美在线高清| 欧美xxx在线观看| 久久久久久久激情视频| 欧美日韩精品一区| 一区二区三区毛片| 久久国产精品一区二区三区四区 | 亚洲国产精品久久久久秋霞影院 | 一区免费观看视频| 在线亚洲自拍| 99在线精品观看| 老色批av在线精品| 久热精品视频在线观看一区| 国产精品家教| 一本色道久久综合亚洲精品小说| 亚洲欧洲一区二区在线播放| 欧美国产精品中文字幕| 国产精品美女久久久久aⅴ国产馆| 欧美大片在线影院| 激情综合亚洲| 欧美在线你懂的| 欧美中文字幕在线视频| 国产欧美日韩高清| 亚洲一区二区三区中文字幕 | 久久久久久久综合日本| 国产精品美女一区二区| 日韩性生活视频| 一本一本a久久| 欧美日韩成人一区二区| 亚洲人体1000| 国产精品香蕉在线观看| 在线视频精品一区| 亚洲视频一区二区在线观看| 欧美日韩不卡视频| 99视频一区二区| 亚洲一区精品视频| 国产精品毛片大码女人| 羞羞答答国产精品www一本| 久久精品视频免费| 精东粉嫩av免费一区二区三区| 久久xxxx精品视频| 免费在线一区二区| 亚洲乱亚洲高清| 国产精品www.| 欧美一区免费| 欧美国产欧美综合| 中文无字幕一区二区三区| 国产精品久久久久久户外露出 | 可以看av的网站久久看| 亚洲午夜久久久久久久久电影网| 欧美高清不卡| 日韩亚洲不卡在线| 欧美一级精品大片| 狠狠88综合久久久久综合网| 亚洲欧洲一区二区三区在线观看| 最新国产成人在线观看| 欧美日韩国产一区二区三区| 亚洲视频欧美视频| 久久综合亚洲社区| 亚洲最新在线视频| 国产欧美精品一区二区色综合 | 99亚洲视频| 久久精品123| 日韩写真在线| 欧美+亚洲+精品+三区| 欧美在线免费观看视频| 尤物精品国产第一福利三区| 性久久久久久久久| 欧美高清在线视频观看不卡| 亚洲视频一区| 亚洲高清毛片| 国产精品欧美日韩| 欧美国产综合| 欧美一区二区三区精品电影| 亚洲日本欧美在线| 久久这里有精品15一区二区三区| 国产精品一区二区三区四区| 久久午夜av| 亚洲在线观看视频网站| 亚洲国产91| 久久久亚洲高清| 欧美一区二区三区婷婷月色| 日韩亚洲不卡在线| 亚洲高清一区二| 国产女人精品视频| 欧美日韩成人在线| 免费久久99精品国产| 性久久久久久久久久久久| 亚洲美洲欧洲综合国产一区| 美日韩精品免费| 久久婷婷av| 久久久久久综合| 亚洲欧美国产精品专区久久|