编程介的小学生 2019-09-28 21:56 采纳率: 20.5%
浏览 149

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

  • 写回答

0条回答 默认 最新

    报告相同问题?

    悬赏问题

    • ¥15 #MATLAB仿真#车辆换道路径规划
    • ¥15 java 操作 elasticsearch 8.1 实现 索引的重建
    • ¥15 数据可视化Python
    • ¥15 要给毕业设计添加扫码登录的功能!!有偿
    • ¥15 kafka 分区副本增加会导致消息丢失或者不可用吗?
    • ¥15 微信公众号自制会员卡没有收款渠道啊
    • ¥100 Jenkins自动化部署—悬赏100元
    • ¥15 关于#python#的问题:求帮写python代码
    • ¥20 MATLAB画图图形出现上下震荡的线条
    • ¥15 关于#windows#的问题:怎么用WIN 11系统的电脑 克隆WIN NT3.51-4.0系统的硬盘