编程介的小学生 2017-12-01 03:47 采纳率: 20.5%
浏览 928
已采纳

Local area network

Problem Description
A local area network (LAN) supplies networking capability to a group of computers in close proximity to each other such as in an office building, a school, or a home. A LAN is useful for sharing resources like files, printers, games or other applications. A LAN in turn often connects to other LANs, and to the Internet or other WAN.
In this contest, everybody is connecting with each others like the following figure.

The contest’s network was built as N rows and M columns, your computer locate at (0, 0) and the judger’s computer locate at (m-1, n-1) The code you submit would only transfer to up or right smoothly. It doesn’t matter if some accidents happened. Could you tell me how many ways from your computer to judger when a data wire was broken?

Input
There are multiple cases. Every case contains two integers in the first line, N, M (3<=N+M<=40). Second line contains four integers X1, Y1, X2, Y2 (0<=X1, X2<M, 0<=Y1, Y2<N, |X1+Y1-X2-Y2|=1), meaning the broken wire position.

Output
Print the answer in one line.

Sample Input
3 3
0 0 1 0

Sample Output
3

  • 写回答

1条回答 默认 最新

  • devmiao 2017-12-02 15:24
    关注
    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?

悬赏问题

  • ¥60 版本过低apk如何修改可以兼容新的安卓系统
  • ¥25 由IPR导致的DRIVER_POWER_STATE_FAILURE蓝屏
  • ¥50 有数据,怎么建立模型求影响全要素生产率的因素
  • ¥50 有数据,怎么用matlab求全要素生产率
  • ¥15 TI的insta-spin例程
  • ¥15 完成下列问题完成下列问题
  • ¥15 C#算法问题, 不知道怎么处理这个数据的转换
  • ¥15 YoloV5 第三方库的版本对照问题
  • ¥15 请完成下列相关问题!
  • ¥15 drone 推送镜像时候 purge: true 推送完毕后没有删除对应的镜像,手动拷贝到服务器执行结果正确在样才能让指令自动执行成功删除对应镜像,如何解决?