• <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久久综合国产精品二区| 亚洲∧v久久久无码精品| 国产精品欧美亚洲韩国日本久久| 国产精品岛国久久久久| 久久国产成人午夜AV影院| 漂亮人妻被中出中文字幕久久| 久久综合久久自在自线精品自| 一本久久久久久久| 久久精品极品盛宴观看| 国产亚洲综合久久系列| 四虎亚洲国产成人久久精品| av无码久久久久久不卡网站 | 综合网日日天干夜夜久久| 久久99国产综合精品免费| 久久综合五月丁香久久激情| 91精品国产综合久久婷婷| 少妇熟女久久综合网色欲| 色噜噜狠狠先锋影音久久| av色综合久久天堂av色综合在| 久久久久无码精品| 久久99热狠狠色精品一区| 久久香蕉国产线看观看精品yw| 久久综合久久综合亚洲| 国産精品久久久久久久| 国产精品久久久久久吹潮| 亚洲精品无码久久久久sm| 97久久婷婷五月综合色d啪蜜芽| 久久青青国产| 久久免费视频一区| 色婷婷久久综合中文久久一本| 大美女久久久久久j久久| 亚洲天堂久久精品| 99久久精品费精品国产| 四虎国产永久免费久久| 久久夜色精品国产亚洲| 国产成人精品久久一区二区三区av | 久久婷婷色综合一区二区| 大蕉久久伊人中文字幕| 丁香色欲久久久久久综合网| 伊人色综合久久天天人手人婷| 久久乐国产综合亚洲精品|