比赛 NOIP模拟赛by mzx Day1 评测结果 RRRRRRRRRR
题目名称 为爱追寻 最终得分 0
用户昵称 ZWOI_Love_/幻想 运行时间 0.026 s
代码语言 C 内存使用 86.13 MiB
提交时间 2016-10-19 20:04:33
显示代码纯文本
  1. #include<stdio.h>
  2. #include<stdlib.h>
  3.  
  4. int n,x,y,p,q,n,i,l,j,c,b,a[5001][5001];
  5.  
  6. int main()
  7. {
  8. freopen("loverfinding.in","r",stdin);
  9. freopen("lovesfinding.out","w",stdout);
  10. scanf("%d %d %d %d %d\n",&n,&x,&y,&p,&q);
  11. if((x==p)&&(y==q)) b=1;
  12. a[x+2500][y+2500]=1;c++;
  13. for(i=0;i<n;i++)
  14. {
  15. scanf("%d %d\n",&l,&j);
  16. x=x+l;y=y+j;
  17. if(a[x+2500][y+2500]==1) continue;
  18. else
  19. {
  20. c++;a[x+2500][y+2500]=1;
  21. };
  22. if((x==p)&&(y==q)) {b=1;break;};
  23. }
  24. if(b==0) printf("SingleDogMZX\n");
  25. else printf("%d\n",c);
  26. return 0;
  27. }