• <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. 數(shù)組逆置
               本來想寫個遞歸的。。但是覺得實在是畫蛇添足。。
            //2011年哈爾濱工業(yè)大學計算機研究生機試題 數(shù)組逆置
            #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. 最大公約數(shù)
               大水不解釋
            //2011年哈爾濱工業(yè)大學計算機研究生機試題 最大公約數(shù) 
            #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. 眾數(shù)
               memset不小心開到while外面去了。。WA*1
            //2011年哈爾濱工業(yè)大學計算機研究生機試題 眾數(shù) 
            #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;
            }

            久久免费小视频| 漂亮人妻被中出中文字幕久久 | 久久青青草原国产精品免费| 久久久一本精品99久久精品88| 久久婷婷五月综合国产尤物app| 久久成人国产精品二三区| 精品水蜜桃久久久久久久| 久久人人爽人人爽人人片AV东京热 | 精品熟女少妇AV免费久久| 国产精品久久网| 亚洲精品无码专区久久久| 久久国产一区二区| 久久久久久久久久久精品尤物| 天天爽天天爽天天片a久久网| 日产久久强奸免费的看| 亚洲乱亚洲乱淫久久| 亚洲欧洲日产国码无码久久99| 国产精品美女久久久免费| 久久久久久久97| 伊人久久精品影院| 精品国产一区二区三区久久蜜臀| 久久综合香蕉国产蜜臀AV| 亚洲国产精品成人久久蜜臀 | 青草国产精品久久久久久| 久久人人爽人人精品视频| 91久久精品国产91性色也| 丁香狠狠色婷婷久久综合| 三上悠亚久久精品| 2021最新久久久视精品爱| 久久丝袜精品中文字幕| 久久久久久国产精品无码下载| 久久精品国产福利国产秒| 久久精品国产一区| 久久精品视频免费| 99久久人人爽亚洲精品美女| 国产精品久久久久久| 国产一级做a爰片久久毛片| 2022年国产精品久久久久| 久久精品视频网| 久久er国产精品免费观看8| 久久国产视频网|