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

            久久亚洲精品成人AV| 久久这里只有精品视频99| 精品国产乱码久久久久久人妻 | 无码专区久久综合久中文字幕| 久久天天日天天操综合伊人av| 亚洲日本久久久午夜精品| 久久香蕉超碰97国产精品| 久久精品国产一区二区三区不卡| 一极黄色视频久久网站| 久久久久久毛片免费播放| 久久青青草原精品国产软件| 99久久香蕉国产线看观香| 久久久久一区二区三区| 亚洲欧洲中文日韩久久AV乱码| 久久综合88熟人妻| 亚洲AⅤ优女AV综合久久久| 久久人人爽爽爽人久久久| 久久久精品人妻无码专区不卡| 亚洲av成人无码久久精品| 久久天天躁狠狠躁夜夜av浪潮| 久久国产精品-国产精品| 久久人妻少妇嫩草AV蜜桃| 国产成人精品久久综合| 久久久精品2019免费观看| 中文字幕精品无码久久久久久3D日动漫| 久久精品成人国产午夜| 久久久久久久97| 久久综合九色综合网站| 久久无码精品一区二区三区| 国产精品免费久久久久电影网| 99精品国产在热久久无毒不卡| 无码超乳爆乳中文字幕久久| 欧美亚洲国产精品久久高清| 麻豆国内精品久久久久久| 久久国产综合精品五月天| AAA级久久久精品无码区| 国产69精品久久久久9999| 天天综合久久久网| 99久久婷婷国产综合精品草原| 亚洲午夜久久影院| 88久久精品无码一区二区毛片|