摘要: http://acm.hdu.edu.cn/showproblem.php?pid=4121中国象棋的简单模拟,给出黑方仅存的老帅坐标,再给出红方棋子坐标,问是否把黑方将死。输入数据有多余空格,所以要用cin,不能用scanf,这块错惨了#include using namespace std ;int abs(int x){ return x>0?x:-x ;}char map[11][11] ;int dir[4][2]={{1,0},{-1,0},{0,1},{0,-1}} ;int RGX,RGY ;int xx,yy ;int ok(int x,int y){ if(y!... 阅读全文