• <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>

            ACM___________________________

            ______________白白の屋
            posts - 182, comments - 102, trackbacks - 0, articles - 0
            <2010年10月>
            262728293012
            3456789
            10111213141516
            17181920212223
            24252627282930
            31123456

            常用鏈接

            留言簿(24)

            隨筆分類(332)

            隨筆檔案(182)

            FRIENDS

            搜索

            積分與排名

            最新隨筆

            最新評論

            閱讀排行榜

            評論排行榜

             

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

             

            題目地址 :

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

            題目分析:

                 沒什么特殊的方法, 簡單模擬就可以了  :

             代碼 :

            代碼
            /*
            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_3082
            Doc Name  : Simplify The Circuit
            */
            //#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;
            char str[110];
            char *tok;
            int main ()
            {
                
            int T;
                scanf ( 
            "%d",&T );
                
            while ( T -- ) {
                    
            int N;
                    
            double res = 0;
                    scanf ( 
            "%d"&N );
                    
            for ( int i = 1; i <= N; ++ i ) {
                        scanf ( 
            "%s", str );
                        tok 
            = strtok ( str, "-" );
                        
            int t = atoi ( tok );
                        
            int r = t;
                        
            while ( tok = strtok ( NULL, "-" ) ) {
                            t 
            = atoi ( tok );
                            r 
            += t;
                        }
                        res 
            += 1.0 / r;
                    }
                    printf ( 
            "%.2lf\n"1.0 / res );
                }
                
            return 0;
            }

             

            国产成人精品久久一区二区三区| 久久精品国产色蜜蜜麻豆| 精品久久久久久国产| 久久精品a亚洲国产v高清不卡| 91精品国产综合久久香蕉| 一本色道久久88综合日韩精品| 色综合久久无码五十路人妻| 国产69精品久久久久99| 欧美精品国产综合久久| 色综合久久中文综合网| 久久无码AV一区二区三区| 久久99精品国产麻豆宅宅| 亚洲精品NV久久久久久久久久| 久久亚洲国产成人精品性色| 国内精品久久久久久久亚洲| 亚洲中文字幕无码久久精品1| 伊人久久大香线焦综合四虎| 亚洲国产精品无码久久久秋霞2| 999久久久国产精品| 国产精品99精品久久免费| 精品久久久无码21p发布| 久久AAAA片一区二区| 精品国产乱码久久久久久1区2区 | 9191精品国产免费久久| 中文字幕乱码久久午夜| 欧美一区二区久久精品| 久久综合久久综合久久| 91久久精品91久久性色| 国产成人精品久久| 2021国产精品久久精品| 久久精品中文字幕有码| 久久久久九九精品影院| 久久久艹| 精品国产日韩久久亚洲| 久久人人添人人爽添人人片牛牛 | 国产精品免费福利久久| 香蕉久久av一区二区三区 | 亚洲成色999久久网站| 97精品伊人久久久大香线蕉| 久久国产精品一区二区| 国产精品欧美久久久久无广告 |