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

            Uriel's Corner

            Research Associate @ Harvard University / Research Interests: Computer Vision, Biomedical Image Analysis, Machine Learning
            posts - 0, comments - 50, trackbacks - 0, articles - 594
            貌似。。哈工大的機試題都極其的水。。。

            1. 數組逆置
               本來想寫個遞歸的。。但是覺得實在是畫蛇添足。。
            //2011年哈爾濱工業大學計算機研究生機試題 數組逆置
            #include<stdio.h>
            #include
            <stdlib.h>
            #include
            <string.h>

            char s[1000];

            int main() {
                
            int i;
                
            while(gets(s) != NULL) {
                    
            for(i = strlen(s) - 1; i >= 0--i) putchar(s[i]);
                    puts(
            "");
                }

                
            return 0;
            }


            2. 最大公約數
               大水不解釋
            //2011年哈爾濱工業大學計算機研究生機試題 最大公約數 
            #include<stdio.h>
            #include
            <stdlib.h>
            #include
            <string.h>
            #include
            <algorithm>
            using namespace std;

            int gcd(int a, int b) {
                
            if(!b) return a;
                
            return gcd(b, a % b);
            }


            int main() {
                
            int a, b;
                
            while(~scanf("%d %d"&a, &b)) {
                    
            if(a < b) swap(a, b);
                    printf(
            "%d\n", gcd(a, b));
                }

                
            return 0;
            }


            3. 眾數
               memset不小心開到while外面去了。。WA*1
            //2011年哈爾濱工業大學計算機研究生機試題 眾數 
            #include<stdio.h>
            #include
            <stdlib.h>
            #include
            <string.h>

            int fg[20];

            int main() {
                
            int mx, mk, a, i;
                
            while(~scanf("%d"&a)) {
                    memset(fg, 
            0sizeof(fg));
                    fg[a]
            ++;
                    
            for(i = 1; i < 20++i) {
                        scanf(
            "%d"&a);
                        fg[a]
            ++;   
                    }

                    mx 
            = 0;
                    
            for(i = 1; i <= 10++i) {
                        
            if(fg[i] > mx) {
                            mx 
            = fg[i];
                            mk 
            = i;
                        }

                    }

                    printf(
            "%d\n", mk);
                }

                
            return 0;
            }

            久久本道久久综合伊人| 久久国产劲爆AV内射—百度| 97久久超碰国产精品旧版| 久久久国产精品亚洲一区| 中文字幕亚洲综合久久| 久久久久亚洲AV无码专区首JN | 精品永久久福利一区二区 | 久久超乳爆乳中文字幕| 久久国产精品一区| 久久精品蜜芽亚洲国产AV| 欧美麻豆久久久久久中文| 国产精品99久久精品| 久久综合亚洲色一区二区三区| 97久久久精品综合88久久| 国产精品久久久久久久app| 久久综合狠狠色综合伊人| 97精品依人久久久大香线蕉97| 久久激情亚洲精品无码?V| 久久福利青草精品资源站| 亚洲中文字幕久久精品无码APP| 国産精品久久久久久久| 72种姿势欧美久久久久大黄蕉| 国产成人精品综合久久久| 亚洲国产成人久久综合区| 久久高潮一级毛片免费| 久久综合久久综合久久综合| 亚洲狠狠婷婷综合久久蜜芽| 色偷偷88欧美精品久久久| 国产精品亚洲综合专区片高清久久久 | 2021国产精品久久精品| 香蕉99久久国产综合精品宅男自| 九九久久精品国产| 国产免费久久精品丫丫| 久久97久久97精品免视看| 久久久九九有精品国产| 久久综合综合久久狠狠狠97色88| 国产精品对白刺激久久久| 国产国产成人精品久久| 久久久精品免费国产四虎| 国产激情久久久久影院| 99久久99久久|