COMP9021 PRINCIPLES OF PROGRAMMING
QUIZ 7
COMP9021 PRINCIPLES OF PROGRAMMING
$ python3 quiz_7.py
Enter four integers: 0 2 2 8
Here is the grid that has been generated:
1 1 0 1 1 1 1 1
1 0 0 1 0 0 1 0
Enter four integers: 3 0 4 1
Will compute the number of good paths from (3, 0) to (4, 1)...
There is no good path.
$ python3 quiz_7.py
Enter four integers: 0 2 5 5
Here is the grid that has been generated:
1 1 0 1 1
1 1 1 1 0
0 1 0 0 1
0 1 0 0 1
1 0 1 1 1
Enter four integers: 0 0 4 4
Will compute the number of good paths from (0, 0) to (4, 4)...
There is no good path.
$ python3 quiz_7.py
Enter four integers: 0 100 1 10
Here is the grid that has been generated:
1 1 1 1 1 1 1 1 1 1
Enter four integers: 2 0 4 0
Will compute the number of good paths from (2, 0) to (4, 0)...
There is a unique good path.
$ python3 quiz_7.py
Enter four integers: 0 100 1 10
Here is the grid that has been generated:
1 1 1 1 1 1 1 1 1 1
Enter four integers: 2 0 5 0
Will compute the number of good paths from (2, 0) to (5, 0)...
There is no good path.
$ python3 quiz_7.py
Enter four integers: 0 3 3 4
Here is the grid that has been generated:
1 1 0 1
1 1 1 1
1 1 1 0
Enter four integers: 1 0 2 1
Will compute the number of good paths from (1, 0) to (2, 1)...
There are 7 good paths.
Date: Trimester 1, 2019.
2 COMP9021 PRINCIPLES OF PROGRAMMING
$ python3 quiz_7.py
Enter four integers: 0 3 3 4
Here is the grid that has been generated:
1 1 0 1
1 1 1 1
1 1 1 0
Enter four integers: 1 0 3 1
Will compute the number of good paths from (1, 0) to (3, 1)...
There are 6 good paths.
$ python3 quiz_7.py
Enter four integers: 0 4 6 5
Here is the grid that has been generated:
1 1 0 1 1
1 1 1 1 1
1 1 1 0 1
1 1 0 0 1
1 0 1 1 1
1 1 1 1 0
Enter four integers: 0 0 3 5
Will compute the number of good paths from (0, 0) to (3, 5)...
There are 5 good paths.
$ python3 quiz_7.py
Enter four integers: 0 6 12 4
Here is the grid that has been generated:
1 1 0 1
1 1 1 1
1 1 1 1
1 1 1 1
0 1 1 1
1 1 1 1
0 1 0 1
1 1 1 0
1 1 1 1
1 1 1 1
1 1 1 0
1 0 0 1
Enter four integers: 1 0 2 10
Will compute the number of good paths from (1, 0) to (2, 10)...
There are 3979 good paths.
因为专业,所以值得信赖。如有需要,请加QQ:99515681 或邮箱:99515681@qq.com
微信:codinghelp
COMP9021 PRINCIPLES OF PROGRAMMING的更多相关文章
- Book Review of "The Practice of Programming" (Ⅰ)
The Practice of Programming In the preface, the author illustrates four basic principles of programm ...
- 中国计算机学会CCF推荐国际学术会议
中国计算机学会推荐国际学术会议 (计算机系统与高性能计算) 一.A类 序号 会议简称 会议全称 出版社 网址 1 ASPLOS Architectural Support for Programmin ...
- (转)我看PhD by 王珢
我看PhD by 王垠 前段时间看了一下这些关于 PhD 的负面信息: 一个专门反对读 PhD 的 BLOG 叫“100 Reasons NOT to Go to Graduate School”(下 ...
- [Z] 计算机类会议期刊根据引用数排名
一位cornell的教授做的计算机类期刊会议依据Microsoft Research引用数的排名 link:http://www.cs.cornell.edu/andru/csconf.html Th ...
- [Z]CS权威会议
CS Conference TOP 40 计算机会议TOP40 一.A 类 15 个 ASPLOS: Architecture Support for Programming Languages an ...
- CCF推荐国际学术会议
类别如下计算机系统与高性能计算,计算机网络,网络与信息安全,软件工程,系统软件与程序设计语言,数据库.数据挖掘与内容检索,计算机科学理论,计算机图形学与多媒体,人工智能与模式识别,人机交互与普适计算, ...
- SCI&EI 英文PAPER投稿经验【转】
英文投稿的一点经验[转载] From: http://chl033.woku.com/article/2893317.html 1. 首先一定要注意杂志的发表范围, 超出范围的千万别投,要不就是浪费时 ...
- myhuiban会议,期刊,科研人员,计算机类会议大全
http://www.myhuiban.com/ List of computer science conferences From Wikipedia, the free encyclopedia ...
- IEEE会议排名(转载)
不知道谁整理的,我就下了个word.所以就标注不了,引用的哪的了. Rank 1: SIGCOMM: ACM Conf on Comm Architectures, Protocols & A ...
随机推荐
- Lua 中 pairs 和 ipairs 的区别
ipairs (t) Returns three values: an iterator function, the table t, and 0, so that the construction ...
- linux下堆溢出unlink的一个简单例子及利用
最近认真学习了下linux下堆的管理及堆溢出利用,做下笔记:作者作为初学者,如果有什么写的不对的地方而您又碰巧看到,欢迎指正. 本文用到的例子下载链接https://github.com/ctfs/w ...
- ES--07
61.索引管理_快速上机动手实战创建.修改以及删除索引 课程大纲 1.为什么我们要手动创建索引? 2.创建索引 创建索引的语法 PUT /my_index{ "settings": ...
- powerdesigner添加mysql的字符集支持
一般建模可能都会用到:powerdesigner 但是,在建表的时候,我一直没有找到: DEFAULT CHARACTER SET COLLATE 两个选项.因此,想了个方法,点击:工具栏->d ...
- Laravel 生成migration ,boolean字段字段转为tinyInteger
Schema::create('consults', function (Blueprint $table) { $table->increments('id'); $table->str ...
- spring+redis的集成,使用spring-data-redis来集成
1.参考:https://www.cnblogs.com/qlqwjy/p/8562703.html 2.首先创建一个maven项目.然后加入依赖的jar包就行了.我加入的jar包很多,反正加入了也没 ...
- jackson对日期的处理(序列化与反序列化)
https://blog.csdn.net/cover1231988/article/details/76021478
- php正则验证车牌格式的函数
/** * 判断是否合法车牌号 * @name isCarLicense * @param $license * @return bool */ function isCarLicense($lice ...
- EF执行SQL返回动态类型
using System; using System.Data.Common; using System.Data.Entity.Core.Objects; using System.Data.Ent ...
- html_基础标签
块级标签: 默认情况会占位一整行行内(内联)标签:默认只有自己的大小 块级标签如: <div>我是字</div> <h1>标题1</h1> < ...