转跳点:--\(˙<>˙)/-- 原本打算大年三十十一起写完的,结果这篇拖到了年初一…… 这道题比刚刚那道,麻烦一点,因为有重复,所以我们需要考虑重复的情况,就是刚刚的两种情况变成了三种: mid < right:left = mid+1 mid > right:right = left; mid ...
分类:
编程语言 时间:
2020-01-25 00:54:05
阅读次数:
120
question:Super Jumping! Jumping! Jumping! 意思就是找一串数字中的和最大子串 思路:创建另一个数组,每一项是路径数组对应项之前最大子串的和,然后遍历此数组找出最大值即可(也是参考了别人的博客,下面是链接,这是接触的第一道dp题,希望慢慢的自己也会写!) 原文链 ...
分类:
编程语言 时间:
2020-01-24 17:31:18
阅读次数:
101
hdu 1090A+B for Input-Output Practice (II) 英文版题目: 中文版题目 简单的A+B问题 #include<iostream> using namespace std; int main() { int a, b; int T; cin >> T; while ...
分类:
其他好文 时间:
2020-01-24 15:58:58
阅读次数:
85
C# 控制台应用 实现 2048游戏 using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace Game ...
题目描述: 给定一个链表,返回链表开始入环的第一个节点。 如果链表无环,则返回 null。 为了表示给定链表中的环,我们使用整数 pos 来表示链表尾连接到链表中的位置(索引从 0 开始)。 如果 pos 是 1,则在该链表中没有环。 说明:不允许修改给定的链表。 分析 给出示意图: 对符号的一些说 ...
分类:
编程语言 时间:
2020-01-24 09:27:50
阅读次数:
86
题目链接:http://codeforces.com/contest/1293/problem/C 题目:给定一个 2*n的地图,初始地图没有岩浆,都可以走, 给定q个询问,每个询问给定一个点(x,y),每个询问有以下作用: (1)如果该点可走,则变为不可走 (2)如果该点不可走,则变为可走 问,每 ...
分类:
其他好文 时间:
2020-01-24 09:12:45
阅读次数:
56
「SPOJ10707」Count on a tree II "传送门" 树上莫队板子题。 锻炼基础,没什么好说的。 参考代码: ...
分类:
其他好文 时间:
2020-01-24 00:34:56
阅读次数:
102
1. how to construct a KNN graph? 常见的方法一般有三类: i. space-partitioning trees; ii. locality sensitive hashing; iii. neighbour exploring techniques. Referen ...
分类:
其他好文 时间:
2020-01-22 19:59:12
阅读次数:
132
(This problem is the same as Minimize Malware Spread , with the differences bolded.) In a network of nodes, each node is directly connected to another ...
分类:
其他好文 时间:
2020-01-22 14:25:47
阅读次数:
117
2020-01-21 21:43:52 问题描述: 问题求解: 这个题目还是有点难度的,感觉很巧妙也很难想到。 整体的思路如下: 1. 首先原问题等价于 +0 / + 2*K 2. 那么res = Max - Min 3. 不断更新Max,Min期望得到更小的res public int small ...
分类:
其他好文 时间:
2020-01-21 23:44:05
阅读次数:
80