• <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)  編輯 收藏 引用
            一本大道加勒比久久综合| 久久久久成人精品无码中文字幕 | 国产精品久久永久免费| 久久久免费精品re6| 免费观看久久精彩视频| 亚洲а∨天堂久久精品9966| 日韩精品无码久久久久久| 精品久久久无码中文字幕天天 | 国产精品无码久久四虎| 18禁黄久久久AAA片| 青青青国产成人久久111网站| 亚洲色欲久久久久综合网| 久久成人精品视频| 亚洲欧美日韩中文久久 | 韩国三级中文字幕hd久久精品| 99久久国产亚洲综合精品| 亚洲午夜久久久精品影院| 久久精品人人做人人爽电影| 国产精品无码久久久久| 久久精品国产亚洲AV电影| 婷婷久久五月天| 久久人人爽人爽人人爽av| 久久线看观看精品香蕉国产| 久久丫精品国产亚洲av不卡| 四虎国产精品成人免费久久| 久久综合视频网站| 精品久久国产一区二区三区香蕉| 久久精品国产精品亚洲毛片| 久久婷婷人人澡人人爽人人爱| 久久夜色精品国产亚洲av| 久久AⅤ人妻少妇嫩草影院| 97久久精品国产精品青草| 青青草原精品99久久精品66| 久久只这里是精品66| 偷偷做久久久久网站| 精品国产日韩久久亚洲| 久久精品国产99久久久古代| 国产成人综合久久精品红| 亚洲中文字幕无码一久久区| 中文精品久久久久人妻不卡| 成人久久免费网站|