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

            學習心得(code)

            superlong@CoreCoder

              C++博客 :: 首頁 :: 聯系 :: 聚合  :: 管理
              74 Posts :: 0 Stories :: 5 Comments :: 0 Trackbacks

            公告

            文字可能放在http://blog.csdn.net/superlong100,此處存放代碼

            常用鏈接

            留言簿(4)

            我參與的團隊

            搜索

            •  

            最新隨筆

            最新評論

            • 1.?re: Poj 1279
            • 對于一個凹多邊形用叉積計算面積 后能根據結果的正負來判斷給的點集的時針方向?
            • --bsshanghai
            • 2.?re: Poj 3691
            • 你寫的這個get_fail() 好像并是真正的get_fail,也是說fail指向的串并不是當前結點的子串。為什么要這樣弄呢?
            • --acmer1183
            • 3.?re: HDU2295[未登錄]
            • 這個是IDA* 也就是迭代加深@ylfdrib
            • --superlong
            • 4.?re: HDU2295
            • 評論內容較長,點擊標題查看
            • --ylfdrib
            • 5.?re: HOJ 11482
            • 呵呵..把代碼發在這里很不錯..以后我也試試...百度的編輯器太爛了....
            • --csuft1

            閱讀排行榜

            評論排行榜

            #include <stdio.h>
            #include 
            <stdlib.h>
            #include 
            <string.h>

            const int N = 1005;
            int n, m;
            int map[N][N];
            int x1, y1, x2, y2;
            int r[N][N], c[N][N];

            bool solve() {
                
            int s1 = (map[x1][y1]!=0), s2 = (map[x2][y2]!=0) ;
                
            if( x1 == x2 && y1 == y2) return false;
                
            for(int x = 0; x < n; x ++) {
                    
            if( abs(c[x1][y1] - c[x][y1]) == (s1&&x<x1) && 
                        abs(c[x2][y2] 
            - c[x][y2]) == (s2&&x<x2) &&
                        abs(r[x][y1] 
            - r[x][y2] ) == 0 
                    ) 
            return true;
                }
                
            for(int y = 0; y < m; y ++) {
                    
            if( abs(r[x1][y1] - r[x1][y]) == (s1&&y<y1) && 
                        abs(r[x2][y2] 
            - r[x2][y]) == (s2&&y<y2) &&
                        abs(c[x1][y] 
            - c[x2][y] ) == 0
                    ) 
            return true;
                }
                
            return false;
            }

            int read(){
                
            int d, c;
                
            while( c = getchar(), c==' '||c=='\n');
                d 
            = c-'0';
                
            while( c = getchar(), c>='0'&&c<='9')d=d*10+c-'0';
                
            return d;
            }

            int main() {
                n
            =read();m=read();
                
            while(n||m) {
                    
            for(int i = 1; i <=n; i ++ ) {
                        
            for(int j = 1; j <= m; j ++) {
                            map[i][j] 
            = read();
                            r[i][j] 
            = r[i][j-1+ (map[i][j] != 0);
                            c[i][j] 
            = c[i-1][j] + (map[i][j] != 0);
                        }
                    }
                    
            int t;
                    scanf(
            "%d"&t);
                    
            for(int i = 0; i < t; i ++) {
                        scanf(
            "%d %d %d %d"&x1, &y1, &x2, &y2);
                        
            if( solve() && map[x1][y1] == map[x2][y2]  && map[x1][y1]!=0) {
                            puts(
            "YES");
                        } 
            else {
                            puts(
            "NO");
                        }
                    }
                    n
            =read();m=read();
                }
            }

            posted on 2010-07-30 15:04 superlong 閱讀(124) 評論(0)  編輯 收藏 引用
            国产成人无码精品久久久性色| 精品久久人人妻人人做精品| 激情综合色综合久久综合| 91精品国产色综合久久| 久久亚洲欧美国产精品| 狠狠色丁香婷婷综合久久来来去| 国产精品熟女福利久久AV| 99久久精品无码一区二区毛片 | 青青草原综合久久大伊人导航| 久久综合久久综合久久综合| 国产精品亚洲综合专区片高清久久久 | 久久久91精品国产一区二区三区 | 欧美久久天天综合香蕉伊| 欧美久久久久久精选9999| 亚洲AV无码久久| 要久久爱在线免费观看| 伊人久久综在合线亚洲2019| 亚洲国产精品无码久久一线| 四虎久久影院| 久久国产香蕉一区精品| www久久久天天com| 香蕉99久久国产综合精品宅男自 | 久久久久人妻一区精品| 日韩乱码人妻无码中文字幕久久| 久久伊人中文无码| 伊人色综合久久天天| 久久WWW免费人成一看片| 久久久WWW成人免费精品| 99久久精品免费国产大片| 久久精品国产91久久综合麻豆自制| 亚洲欧美日韩中文久久| 91久久精品视频| 久久99热精品| 伊人久久大香线蕉影院95| 久久福利青草精品资源站| 精品国产VA久久久久久久冰 | 国产福利电影一区二区三区久久老子无码午夜伦不 | 久久久久久综合一区中文字幕 | 精品久久综合1区2区3区激情| 午夜精品久久久久久毛片| 久久人人爽人人爽人人片AV东京热|