描述 一个机器人位于一个 m x n 网格的左上角 (起始点在下图中标记为“Start” )。 机器人每次只能向下或者向右移动一步。机器人试图达到网格的右下角(在下图中标记为“Finish”)。 现在考虑网格中有障碍物。那么从左上角到右下角将会有多少条不同的路径? 网格中的障碍物和空位置分别用 1 ...
分类:
其他好文 时间:
2019-11-15 18:37:30
阅读次数:
70
1. 具体题目 罗马数字包含以下七种字符: I, V, X, L,C,D 和 M。 I 1V 5X 10L 50C 100D 500M 1000例如, 罗马数字 2 写做 II ,即为两个并列的 1。12 写做 XII ,即为 X + II 。 27 写做 XXVII, 即为 XX + V + II ...
分类:
编程语言 时间:
2019-11-14 21:43:02
阅读次数:
76
D. Yet Another Monster Killing Problem You play a computer game. In this game, you lead a party of ?? heroes, and you have to clear a dungeon with ?? ...
分类:
其他好文 时间:
2019-11-14 20:16:03
阅读次数:
92
题目: ? 给定一个整数数组和一个整数 k ,判断数组中是否存在两个不同的索引 i 和 j ,使得 nums [i] = nums [j] ,并且 i 和 j 的差的绝对值最大为 k 。 ? Given an array of integers and an integer k , find out ...
分类:
其他好文 时间:
2019-11-14 19:45:36
阅读次数:
65
数据请求 get 新建一个服务 1. ng g service services /+服务名 eg:ng g service services/player 在此服务中进行设置 引入自带组件以及注册 import {HttpClient,HttpHeaders} from '@angular/com ...
分类:
其他好文 时间:
2019-11-14 18:10:27
阅读次数:
135
题目描述: 给定一个数组 candidates 和一个目标数 target ,找出 candidates 中所有可以使数字和为 target 的组合。 candidates 中的每个数字在每个组合中只能使用一次。 说明: 所有数字(包括目标数)都是正整数。解集不能包含重复的组合。 示例 1: 输入: ...
分类:
其他好文 时间:
2019-11-14 13:42:51
阅读次数:
56
Alex doesn't like boredom. That's why whenever he gets bored, he comes up with games. One long winter evening he came up with a game and decided to pl ...
分类:
其他好文 时间:
2019-11-13 22:31:01
阅读次数:
129
文件读写 with open('Game/Dota.txt','w')as file: file.write('Radiant Victory! ') 当Game文件夹未创建时,出现FileNotFoundError 必须手动创建文件夹,或者用 import os # 创建的目录 path = "G ...
分类:
编程语言 时间:
2019-11-13 16:02:38
阅读次数:
64
Given four lists A, B, C, D of integer values, compute how many tuples (i, j, k, l) there are such that A[i] + B[j] + C[k] + D[l] is zero. To make pro ...
分类:
其他好文 时间:
2019-11-13 13:27:48
阅读次数:
79
给定一个 2n 个结点的完全二分图,1~n 在左边,n+1~2n 在右边。第 i 个点与第 j+n 个点的边权为 aij,且 aij 互不相同。
Alice 与 Bob 在这个图上博弈。
一开始 Alice 选择 "increase" 或 "decrease",Bob 自动得到另一个。然后 Ali... ...
分类:
其他好文 时间:
2019-11-13 11:12:12
阅读次数:
107