摘要: round 1: update 100 unix kernel machines in the moon; round 2: robot, turnright(int k), turnleft(int k), move(), and clean(), 设计一个系统把房间扫干净; round 3: r 阅读全文
posted @ 2018-02-14 09:11 jxr041100 阅读(159) 评论(0) 推荐(0) 编辑
摘要: HDU 1542 [POJ 1151] Atlantis (矩形面积并) 题意: 求N<=100个矩形的面积并 分析: 离散化: 这些技巧都是老生常谈的了, 不然浮点数怎么建树, 离散化x坐标就可以了 扫描线: 首先把矩形按y轴分成两条边, 上边和下边, 对x轴建树, 扫描线可以看成一根平行于x轴的 阅读全文
posted @ 2018-02-12 08:23 jxr041100 阅读(481) 评论(0) 推荐(0) 编辑
摘要: 1. 给定四个API,move()turnLeft(),turnRight(),clean(). move():如果机器人可以往前一格,就会移到往前并回传true,否则false。 ()即将机器人向左转,clean()就是清理所在位置 要求机器人扫除所有可走空间。 基本上就dfs做呗用相对出发点的座 阅读全文
posted @ 2018-02-11 09:58 jxr041100 阅读(711) 评论(0) 推荐(0) 编辑
摘要: This question is about implementing a basic elimination algorithm for Candy Crush. Given a 2D integer array board representing the grid of candy, diff 阅读全文
posted @ 2018-02-11 01:59 jxr041100 阅读(407) 评论(0) 推荐(0) 编辑
摘要: Given a set of words (without duplicates), find all word squares you can build from them. A sequence of words forms a valid word square if the kth row 阅读全文
posted @ 2018-02-11 01:51 jxr041100 阅读(135) 评论(0) 推荐(0) 编辑
摘要: Welcome to my ‘how to implement a search engine’ series. I describe how to implement an actual search engine with working code in python. Here you can 阅读全文
posted @ 2018-02-10 09:20 jxr041100 阅读(265) 评论(0) 推荐(0) 编辑
摘要: 数据挖掘、机器学习和推荐系统中的评测指标—准确率(Precision)、召回率(Recall)、F值(F-Measure)简介。 引言: 在机器学习、数据挖掘、推荐系统完成建模之后,需要对模型的效果做评价。 业内目前常常采用的评价指标有准确率(Precision)、召回率(Recall)、F值(F- 阅读全文
posted @ 2018-02-10 06:17 jxr041100 阅读(1051) 评论(0) 推荐(0) 编辑
摘要: Implement next permutation, which rearranges numbers into the lexicographically next greater permutation of numbers. If such arrangement is not possib 阅读全文
posted @ 2018-02-10 03:41 jxr041100 阅读(120) 评论(0) 推荐(0) 编辑
摘要: Given a time represented in the format "HH:MM", form the next closest time by reusing the current digits. There is no limit on how many times a digit 阅读全文
posted @ 2018-02-10 03:11 jxr041100 阅读(129) 评论(0) 推荐(0) 编辑
摘要: Given a digit string, return all possible letter combinations that the number could represent. A mapping of digit to letters (just like on the telepho 阅读全文
posted @ 2018-02-09 14:25 jxr041100 阅读(102) 评论(0) 推荐(0) 编辑