• <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无码久久一区| 一本久久久久久久| 欧美黑人又粗又大久久久| 久久精品国产亚洲av影院| 99久久精品毛片免费播放| 久久精品国产99国产精品| 色天使久久综合网天天| 99久久99久久精品国产片果冻| 欧美亚洲国产精品久久高清| 久久精品亚洲日本波多野结衣 | 久久亚洲高清综合| 久久久久亚洲精品无码蜜桃| 久久国产香蕉视频| 久久99热精品| 久久精品人人做人人爽电影蜜月| 三级韩国一区久久二区综合| 国产精品久久久久久影院| 久久精品国产亚洲AV蜜臀色欲| 久久久精品午夜免费不卡| 久久精品99久久香蕉国产色戒| 一个色综合久久| 久久伊人影视| 欧美粉嫩小泬久久久久久久| 国产免费福利体检区久久| 国产精品9999久久久久| 日产精品99久久久久久| 精品无码久久久久国产动漫3d| 久久综合色之久久综合| 久久夜色tv网站| 国产精品成人99久久久久 | 久久精品国产久精国产| 亚洲中文字幕久久精品无码APP | 三上悠亚久久精品| 少妇久久久久久被弄高潮| 久久AV无码精品人妻糸列| 久久精品青青草原伊人| 久久精品国产亚洲αv忘忧草| 国内精品久久久久影院亚洲| 久久人人爽人人爽人人爽| 亚洲精品无码成人片久久| 精品一二三区久久aaa片|