• <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 閱讀(127) 評論(0)  編輯 收藏 引用
            久久影院综合精品| 韩国免费A级毛片久久| 99久久免费只有精品国产| 久久精品卫校国产小美女| 国内高清久久久久久| 久久最近最新中文字幕大全 | 久久天天躁夜夜躁狠狠| 日韩精品久久久肉伦网站| 国产精品免费久久久久久久久| 国产精品久久久久蜜芽| 欧美伊香蕉久久综合类网站| 思思久久好好热精品国产| 久久久91精品国产一区二区三区| 波多野结衣久久精品| 国产精品九九久久精品女同亚洲欧美日韩综合区 | 狠狠精品久久久无码中文字幕 | 久久婷婷五月综合国产尤物app| 久久66热人妻偷产精品9| 国产69精品久久久久APP下载| 久久免费视频网站| 亚洲国产欧洲综合997久久| 久久精品国产色蜜蜜麻豆| 精品午夜久久福利大片| 亚洲综合伊人久久大杳蕉| 亚洲欧美日韩久久精品| 狠狠人妻久久久久久综合| 久久久精品免费国产四虎| 国产亚洲精久久久久久无码| 国产亚洲精久久久久久无码77777| 久久最新免费视频| 久久久人妻精品无码一区| 国产成人久久精品麻豆一区| 亚洲国产精品一区二区久久| 久久国产乱子精品免费女| 国内精品久久久久久久97牛牛| 午夜精品久久久久久毛片| 久久人妻AV中文字幕| 亚洲国产另类久久久精品黑人| 漂亮人妻被中出中文字幕久久| 国内精品久久国产| 久久久www免费人成精品|