| 记录编号 | 326705 | 评测结果 | TTTTTTTTTT | 
    
        | 题目名称 | 2506.为爱追寻 | 最终得分 | 0 | 
    
        | 用户昵称 |  Shirry | 是否通过 | 未通过 | 
    
        | 代码语言 | C++ | 运行时间 | 10.000 s | 
    
        | 提交时间 | 2016-10-21 13:07:07 | 内存使用 | 0.30 MiB | 
    
    
    
    		显示代码纯文本
		
		#include<cstdio>
#include<vector>
#include<algorithm>
#include<functional>
using namespace std;
int n,x0,y0,xt,yt,ans=1;
class T{
public:
	int x,y;
}temp;
vector<T>A;
bool zz=false;
struct TFindByCoord : public std::binary_function<T,T,bool>{
	bool operator()(const T &obj1,const T &obj2)const{
		return obj1.x==obj2.x&&obj1.y==obj2.y;
	}
};
int main(){
	freopen("loverfinding.in","r",stdin);
	freopen("loverfinding.out","w",stdout);
	scanf("%d%d%d%d%d",&n,&x0,&y0,&xt,&yt);
	temp.x=x0;temp.y=y0;
	A.push_back(temp);
	int dx,dy;
	for(int i=1;i<=n;i++){
		scanf("%d%d",&dx,&dy);
		temp.x+=dx;
		temp.y+=dy;
		if(temp.x==xt&&temp.y==yt){
			ans++;
			zz=true;
			break;
		}
		std::vector<T>::iterator result=std::find_if(A.begin(),A.end(),std::bind2nd(TFindByCoord(),temp));
		if(result==A.end()){
			A.push_back(temp);
			ans++;
		}
	}
	if(zz==true)printf("%d",ans);
	else printf("SingleDogMZX");
	return 0;
}