Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
1
1-homework-yanjun
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
bonnieyan
1-homework-yanjun
Commits
597c7e71
Commit
597c7e71
authored
Jan 19, 2019
by
bonnieyan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
提交作业
parent
60d2c4a4
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
25 additions
and
0 deletions
+25
-0
6-homework-yanjun/heaters.py
+10
-0
7-homework-yanjun/matrix.py
+15
-0
No files found.
6-homework-yanjun/heaters.py
0 → 100644
View file @
597c7e71
#
#
# class Solution(object):
#
# def find_radius(self, house, heaters):
#
#
#
# su = Solution()
# su.find_radius([1, 2, 3, 4], [1, 4])
7-homework-yanjun/matrix.py
0 → 100644
View file @
597c7e71
class
Matrix
:
def
topu_matrix
(
self
,
matrix
):
for
i
in
range
(
len
(
matrix
)
-
1
):
for
j
in
range
(
len
(
matrix
[
i
])
-
1
):
if
matrix
[
i
+
1
][
j
+
1
]
!=
matrix
[
i
][
j
]:
return
False
return
True
m
=
Matrix
()
matrix
=
[[
1
,
2
,
3
,
4
],
[
5
,
1
,
2
,
3
],
[
9
,
5
,
1
,
2
]]
result
=
m
.
topu_matrix
(
matrix
)
print
(
result
)
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment