包含标签:oi 的文章
-
Orange Boy Can You Solve It Out? Ep. 68
This is a hard version of Ep. 67. If you prefer an easier problem, please see OBCYSIO67. Meeting Point Given a directed graph G of n vertices and m edges. A single vertex S is called the starting point and a single vertex T is called the finish poi…… -
Orange Boy Can You Solve It Out? Ep. 67
Solved! Difficulty: D2C Pretty basic exercise problem from FLA This is an easy version of Ep. 68. If you prefer harder problems, please visit here. Meeting Point Given a directed graph G of n vertices and m edges. A single vertex S is called …… -
Orange Boy Can You Solve It Out? Ep. 66
Solved! Difficulty: Div2C Classic 思考题 HP You are given a grid of n*m cells. You start from a starting cell S and can move up, down, left or right in one step without leaving the grid. Find: is it possible to visit each cell once and exactl…… -
Orange Boy Can You Solve It Out? Ep. 62
short 思考题 A^B Problem Given two pattern strings A and B that consists of lower-case letters, ? (match a single character) and * (match zero or more characters) For example, abc?d*e matches abcfdppe and abcgde but not ae or abcdee. Find a string …… -
一种无递归、无栈、无parent指针的红黑树实现
前言 红黑树是一种复杂的平衡树,在大部分情况下都会使用父指针或者递归实现。假如我们一定要三无实现呢? 本文必须配合OI-Wiki食用!! 基础结构 #define BLK_COLOR 0 #define RED_COLOR 1 #define LEFT 0 #define RIGHT 1 #define Color(node) (node==NULL?BLK_COLO…… -
一种基于维护高度的无递归、无栈、无parent指针的AVL树实现方式
感谢XLH同学指出blog中的一些错误,本文已于2024/9/28更新 引入 AVL树有种种实现方式,其中最自然的是采用递归的写法,毕竟AVL树是递归定义的。但是,有的老师认为“递归时间常数大”,觉得应该用迭代。但是,还有老师认为迭代要用栈,“栈空间大(指占用了 O(\log n) )…… -
Orange Boy Can You Solve It Out? Ep. 61
思考题 featuring Hikari again! Guess the string Hikari and her master Ninetail are playing a game. Hikari thinks of a string S with lower-case letters, and Ninetail asks her to make q modifications one by one. Each modification can only be one of t…… -
Orange Boy Can You Solve It Out? Ep. 60.5
思考题 from Maths homework again... Why 60.5? Not because it has sth to do with the previous problem, which happens to also be a math problem. It's because the next OBCYSIO was also named as Ep.61 and the problem was discovered 1 year later!! 数学…… -
YZHT Ep.3: 简单最小割
呃呃,笔者最大流水平真是哈哈了,请见本题: 104871C 一眼网络流,怎么构图? Hint:有费用的网络但是不是最小费用流?那就考虑一下最小割吧! 一个蛋糕可以考虑成:选择蛋糕->选择工具。一个蛋糕被创造需要:选择蛋糕、选择所有工具。「所有」二字让我们考虑最小割!…… -
YZHT Ep.2: 少见的三分
题目:给出一个圆和两点,求这两点间最短路线的距离,要求路线经过圆内部或边上的任意一点。 链接:104871G 如果两个点有一个在圆内(上)就好了…… 如果两个都在圆外,设经过的圆上一点有仰角\alpha,那么注意到答案关于\alpha一定只有一个极小值。就可以三分了! 难……




