Learning Golang I

Go语言快速上手I 喜欢Go的函数式编程, 统一的Google代码风格, 这点我很赞同一致使用Google编程规范Google_Cpp_Style

HDU 5527 Too Rich

题意 给出10张硬币,问如何凑出P¥且数量最多,无方案输出-1 思路 如果面值连续,后一个是前一个的倍数,从大往小凑,用小因子去凑更多的硬币, 但是


本文讨论三个问题 计算机如何表示浮点数,不同平台,处理器,是否一致 32位精度浮点数float与64位精度浮点数double能表示的范围 浮点数是

HDU 6253 knightmare 2017CCPC-K

Description A knight jumps around an infinite chessboard. The chessboard is an unexplored territory. In the spirit of explorers, whoever stands on a square for the first time claims the ownership of this square. The knight initially owns the square he stands, and jumps $N$ times before he gets bored. Recall that a knight can jump in 8 directions. Each direction consists of two squares forward and then one squaure


点分治 在开始树上点分治前,复习下树的直径,树的重点,以及深度,分治小知识。 树的直径 两遍$dfs()$,第一次求出直径的一个端点,第二次求出以


尺取法顾名思义是用尺子一段一段测量。测量物件长度通常是一端对其,看另一端的刻度得出答案; 借挑战上的话 尺取法通常是数组保存一对下标,即所选取的区间的左右端点,然后根据实际问题不断推进区间,在这其中可以根据已有经验保持右端点从上一状态继续推进。


Atcoder 88 D-Wide Flip

Time limit : 2sec / Memory limit : 256MB You are given a string $S$ consisting of 0 and 1. Find the maximum integer $K$ not greater than $|S|$ such that we can turn all the characters of $S$ into 0 by repeating the following operation some number of times. Choose a contiguous segment $[l,r]$ in $S$ whose length is at least $K$ (that is,$r-l+1\geq K$ must be satisfied). For


这段时间做了区间DP在此总结下 POJ 1651 Multiplication Puzzle 题意 给出序列$a$,求出最小得分—— 取出的数左边的数右边的数 (不能取两边),实质为矩阵链乘变形,设$d

2017 ICPC Xian Xor树上异或

题意 给出一棵树,$n≤5e4 $, $ \left(q≤5e4 \right)$次询问,每次询问三元组$ \left(u,v,k \right) $,返回从$ u $,到$v$ 上序号$ \left(from \ 0 \

HDU 6023 ping ping ping

Time Limit: 2000⁄1000 MS (Java/Others) Problem The structure of the computer room in Northeastern University is pretty miraculous. There are $ n$ servers, some servers connect to the gateway whose $ IP$ address is $ 0$ directly. All servers are connected with each other by $ n$ netting twines. It is said that this structure is favorable for maintaining physical problem of servers. But because of an unexpected rainstorm, the