比赛 |
NOIP模拟赛by mzx Day1 |
评测结果 |
TTTTTTTTTT |
题目名称 |
为爱追寻 |
最终得分 |
0 |
用户昵称 |
Riolu |
运行时间 |
10.017 s |
代码语言 |
C++ |
内存使用 |
0.28 MiB |
提交时间 |
2016-10-19 19:57:20 |
显示代码纯文本
/*=========================================*
* Auther: Riolu
* Time: 2016.10.19
* Copyright 2016 Riolu. All Rights Reserved.
*=========================================*/
#include<cstdio>
#include<cstdlib>
#include<iostream>
#include<algorithm>
#include<vector>
#include<queue>
#include<map>
#include<set>
#include<cmath>
#include<string>
#include<cstring>
using namespace std;
const int N=1e9;
int n,dx,dy,ans;
struct note{
int x,y;
bool operator < (const note &a) const {
if(a.x==x)return a.y<y;
return a.x<x;
}
}t,s,k;
set<note> se;
int main(){
freopen("loverfinding.in","r",stdin);
freopen("loverfinding.out","w",stdout);
int i,flag=1;
scanf("%d%d%d%d%d",&n,&s.x,&s.y,&t.x,&t.y);
se.insert(s);
k=s;
for(i=1;i<=n;i++){
scanf("%d%d",&dx,&dy);
k.x=k.x+dx;
k.y=k.y+dy;
if(!se.count(k)){
se.insert(k);
//cout<<k.x<<"go"<<k.y<<endl;
}
if(k.x==t.x && k.y==t.y){flag=0;break;}
}
if(flag)printf("SingleDogMZX");
else printf("%d",se.size());
return 0;
}
/*
*/