• <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 閱讀(126) 評論(0)  編輯 收藏 引用
            无码AV波多野结衣久久| 久久99精品久久久久久齐齐| 亚洲Av无码国产情品久久| 久久人人爽人人爽人人片AV麻豆 | 蜜臀av性久久久久蜜臀aⅴ麻豆| 日韩欧美亚洲综合久久| 99久久99久久久精品齐齐 | 亚洲精品无码成人片久久| 久久久噜噜噜久久熟女AA片| 日本道色综合久久影院| 久久久无码精品亚洲日韩蜜臀浪潮| 精品无码久久久久国产| 亚洲精品午夜国产va久久 | 人妻丰满?V无码久久不卡| 久久夜色精品国产噜噜亚洲AV| 国产成人99久久亚洲综合精品| 性做久久久久久久| 日韩久久无码免费毛片软件| 夜夜亚洲天天久久| 久久亚洲国产成人精品性色| 久久综合一区二区无码| 一级做a爰片久久毛片16| 久久精品人人做人人爽电影蜜月| 欧美色综合久久久久久| 国产精品青草久久久久福利99| 国产精品99久久免费观看| 青草国产精品久久久久久 | 婷婷综合久久狠狠色99h| 欧洲精品久久久av无码电影| 久久无码专区国产精品发布| 久久久久亚洲精品男人的天堂| 91精品婷婷国产综合久久 | 亚洲国产成人精品女人久久久| 伊人久久综合热线大杳蕉下载| 精品久久久无码人妻中文字幕豆芽| 亚洲va久久久久| 怡红院日本一道日本久久| 久久久国产精品福利免费| 久久99久久99小草精品免视看 | 久久婷婷五月综合成人D啪| 欧美久久久久久午夜精品|