摘要: 秒答,得再来一题。 思路 1.找到三次比赛最大概率结果所在的位置 2.映射输出结果字母,以及profit值 代码 阅读全文
posted @ 2020-04-10 10:33 XinyuLee 阅读(68) 评论(0) 推荐(0) 编辑
摘要: 贵有恒,何必三更起五更睡;最无益,只怕一日曝十日寒。 阅读全文
posted @ 2020-04-09 17:13 XinyuLee 阅读(214) 评论(0) 推荐(0) 编辑
摘要: 思路 直接暴力枚举,有一个测试点会超时。有两个错误一直没找到,应该是有模糊的边界条件没考虑到。 超时解决办法:二分查找 阅读全文
posted @ 2020-04-09 09:34 XinyuLee 阅读(92) 评论(0) 推荐(0) 编辑
摘要: 思路 每层存入数组; 对每层与前一层的层数进行比较; 每次比较后更新总时间; 阅读全文
posted @ 2020-04-08 10:53 XinyuLee 阅读(60) 评论(0) 推荐(0) 编辑
摘要: 思路 两种方法,一种方法暴力求解 一种方法实时读入,当当前相加和小于0时,当前相加和更新为0。 方法1 求出全部最大序列和 第五个测试点啊,理解有问题?不知道哪儿错了,数据为全是负数和0。希望有明白的读者加以指正。 方法2 实时处理 阅读全文
posted @ 2020-04-07 23:18 XinyuLee 阅读(99) 评论(0) 推荐(0) 编辑
摘要: At the beginning of every day, the first person who signs in the computer room will unlock the door, and the last one who signs out will lock the door 阅读全文
posted @ 2020-04-06 20:40 XinyuLee 阅读(148) 评论(0) 推荐(0) 编辑
摘要: An inorder binary tree traversal can be implemented in a non recursive way with a stack. For example, suppose that when a 6 node binary tree (with the 阅读全文
posted @ 2020-04-03 15:47 XinyuLee 阅读(80) 评论(0) 推荐(0) 编辑
摘要: Given a non negative integer N, your task is to compute the sum of all the digits of N, and output every digit of the sum in English. Input Specificat 阅读全文
posted @ 2020-04-02 12:05 XinyuLee 阅读(103) 评论(0) 推荐(0) 编辑
摘要: This time, you are supposed to find A+B where A and B are two polynomials. Input Specification: Each input file contains one test case. Each case occu 阅读全文
posted @ 2020-04-01 12:20 XinyuLee 阅读(113) 评论(0) 推荐(0) 编辑
摘要: Calculate a+b and output the sum in standard format that is, the digits must be separated into groups of three by commas (unless there are less than f 阅读全文
posted @ 2020-03-31 11:26 XinyuLee 阅读(113) 评论(0) 推荐(0) 编辑