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 ...
随机推荐
- zabbix批量监控域名下nginx的访问50x状态码数量
背景: 购物车相关的站点某些页面经常出现502,如果超过一些阈值则需要报警给管理员知道 .自动发现脚本的编写 # vim /usr/local/zabbix_agents_3.2.0/scripts/ ...
- php 常用的自定义函数
1. 发送 SMS 在开发 Web 或者移动应用的时候,经常会遇到需要发送 SMS 给用户,或者因为登录原因,或者是为了发送信息.下面的 PHP 代码就实现了发送 SMS 的功能. 为了使用任何的语言 ...
- java学习 之 操作符
操作符介绍 java语言操作符 1.赋值操作符 = 2.计算操作符 + .- (减.负号).*(乘)./(除) 3.递增递减 --(递减).++(递增) 4.关系操作符 ==.!= ...
- hdu5705
题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=5705 题目: Problem Description Given a time HH:MM:SS an ...
- Django & JavaScript 用Ajax实现JSON数据的请求和响应
[描述] 1.Server端定义了两个字段:Article.title 和 Article.content 2.客户端用JavaScript Ajax异步加载请求服务器的JSON数据 效果是点击按钮从 ...
- Elasticsearch大规模时序索引如何治理和规划
什么是时序索引? 其主要特点体现在两个方面, 一存,以时间为轴,数据只有增加,没有变更,并且必须包含timestamp(日期时间,名称随意)字段,其作用和意义要大于数据的id字段,常见的数据比如我们通 ...
- Synergy简单使用小记
需求: 两台笔记本用两套键盘鼠标,那体验,糟透了. 怎样才能使得两个主机公用一套鼠标和键盘呢?上网搜索到Synergy这款软件 参考: 具体使用方法参考了这篇博文 基本使用: 这款软件分为服务端和客户 ...
- Android数据存储引擎---SQLite数据库
目标:是否可以在PC端桌面上使用SQLite数据库制作一个财务文件? 目录: 来源: 实践: 总结和比较: SQLite数据简介 是什么,内部结构是怎样的,数据库和表的关系是什么 有什么用 常用的操作 ...
- mongodb 遇到的问题一 Error: connect ECONNREFUSED 127.0.0.1:27017
node配合mongodb是配置完成后,访问时出现 Error: connect ECONNREFUSED 127.0.0.1:27017,的报错 原因在于你的mongodb数据库没开, node下的 ...
- 07-Python入门学习-字符编码与文件处理
字符编码 人操作计算机使用人类认识的字符,而计算机存放都是二进制数字所以人在往计算机里输入内容的时候,必然发生: 人类的字符------(字符编码表)-------->数字 比如我输入一个‘上’ ...