lecture-notes lecture games notes

ICPC2022Hangzhou D Money Game 题解

思维 Link ICPC2022Hangzhou D Money Game Question \(n\) 个人围成一圈,初始每个人有 \(a_i\) 元,每轮第 \(i\) 个人给第 \((i+1)\%N\) 个人自己一半的钱,问第 \(2022^{1024}\) 轮后每个人的钱 Solution ......
题解 Hangzhou Money ICPC 2022

A. Flipping Game

A. Flipping Game 本质上是让我们找出一段区间内\(0\)的个数大于\(1\)的个数的最多的区间,且必须进行一次操作,所以可以考虑区间\(dp\),或者最小子序列和 1 最小子序列和 \[\begin{aligned} dp_i是以a_i结尾的最小子序列和 \\ dp_i=\min(d ......
Flipping Game

python note

......
python note

Codeforces Round 912 (Div. 2) E - Geo Game

考虑什么时候会改变答案的奇偶,显然可以根据\(x \oplus y\)的奇偶性分组,在组内进行跳跃不会改变,只有当组间跳跃的时候才会改变。 打表观察先手什么时候必胜,其中:\(u\)是当前获胜目标为奇/偶(1/0),\(v\)是位于哪一组,\(a,b\)代表两组还剩多少,\(st\)代表当前答案的奇 ......
Codeforces Round Game 912 Div

SAP CRM note 的修改操作实现

通过一个具体的例子来说明。 我们在 CRM WebClient UI 上需改 note,比如增添 1234 的字符串: 最终会调用到 SAVE_TEXT 这个 Function Module: 通过调试器可以看到 WebClient UI 上输入的 1234 应该传递到这个函数里了: SAVE_TE ......
note SAP CRM

Kotlin Notes - 5

In Kotlin, the type system distinguishes between references that can hold null (nullable references) and those that cannot (non-nullable references). ......
Kotlin Notes

Game Physics

Basic concepts form physics Rigid Body Classification Single particles and particles system are examples of discrete material. The standard notation i ......
Physics Game

[Codeforces] CF1747C Swap Game

游戏(game.cpp)—CF1747C—1200 \(时间:1s \space |\space 空间:250MB\) 题面翻译 Alice 和 Bob 两个人在玩游戏。 有一个长度为 \(n\) 的序列 \(a\),Alice 和 Bob 两人轮流完成一个操作,Alice 先开始。 每个人可以将数 ......
Codeforces 1747C 1747 Swap Game

fps-bp-notes

FPS Blueprint notes Subtitle: Youtube 上的 FPS UE 项目笔记 Created: 2023-11-14T21:55+08:00 Published: 2023-11-24T16:54+08:00 Categories: UnrealEngine Creati ......
fps-bp-notes notes fps bp

(15-418)Lecture 2 A Modern Multi-Core Processor

并行执行的方式 本节内容围绕一个程序,针对如何改变处理器的结构来加速程序提出了多个idea 示例程序:该程序通过泰勒展开式来估算sin(x)的值 一个最简单的处理器,每个时钟周期只能执行一条指令,而利用ILP(指令级平行)的超标量处理器可同时执行两条指令(当指令间不存在依赖时),但示例程序存在数据依 ......
Multi-Core Processor Lecture Modern Multi

[Notes] Mac安装多版本Java并切换

通过 /usr/libexec/java_home -V 查询mac中存在哪些版本的java. 前往https://www.oracle.com/java/technologies/downloads/archive/下载各版本的java。 例如JDK8的具体下载链接为:https://www.or ......
版本 Notes Java Mac

Kotlin Notes - 4

A higher-order function is a function that takes functions as parameters, or returns a function. fun <T, R> Collection<T>.fold( initial: R, combine: ( ......
Kotlin Notes

[题解]CF1899D Yarik and Musical Notes

思路 暴力化简公式题。 假定 \(b_{i}^{b_j} = b_{j}^{b_{i}}\) 成立,那么有: \[2^{a_i \times 2^{a_j}} = 2^{a_j \times 2^{a_i}}\\ a_i \times 2^{a_j} = a_j \times 2^{a_i}\\ \ ......
题解 Musical 1899D Yarik Notes

Chain-Of-Note:解决噪声数据、不相关文档和域外场景来改进RAG的表现

CoN要点 CoN框架由三种不同的类型组成,研究称之为阅读笔记。 上面的图像,类型(A)显示了检索到的数据或文档回答查询的位置。LLM仅使用NLG从提供的数据中格式化答案。 https://avoid.overfit.cn/post/1a108bbaf6c84b5fbc51554fefa222cd ......
噪声 Chain-Of-Note 场景 文档 数据

「Note」CF 套题

散题 \(\color{royalblue}{CF840B}\) 神秘题,其实很显著,但没切出来。 考虑无解情况,因为无向边只能带来偶数个度数,所以总度数为奇数且无限制为 \(-1\) 的点时无解(因为有 \(-1\) 就可以调整为偶数)。可以证明在总度数为偶数时一定有解: 首先应该注意到总图连通, ......
Note

Kotlin Notes - 3

Function parameters can have default values, which are used when you skip the corresponding argument. This reduces the number of overloads: fun read( ......
Kotlin Notes

CF1899 D Yarik and Musical Notes 题解

Link CF1899 D Yarik and Musical Notes Question 给出一个序列 \(a\) ,我们定义 \(b_i=2^{a_i}\) 求 \(b_i^{b_j}=b_j^{b_i} (i<j)\) 的个数 Solution 考虑化简式子 \[\begin{aligned ......
题解 Musical Yarik Notes 1899

Solution - Partition Game

Link. 做 vjudge 的题有一种美丽的窒息的感觉。 设 \(f_{i, j}\) 表示前 \(i\) 个选 \(j\) 段出来的最小代价,转移 \(f_{i, j} = \min_{0 \leq k < i} \{f_{k, j - 1} + w_{k + 1, i} \}\),\(w_{k ......
Partition Solution Game

【题解 CF1628D2】 Game on Sum

Game on Sum (Hard Version) 题面翻译 Alice 和 Bob 正在玩一个游戏,游戏分为 \(n\) 个回合,Alice 和 Bob 要轮流对一个数 \(x\) 进行操作,已知这个数初始值是 \(0\)。 具体每个回合的行动规则如下: Alice 选择一个在区间 \([0,k ......
题解 1628D 1628 Game Sum

Lecture3

......
Lecture3 Lecture

Human brain is awesome! (Transcripting notes and Practice my English writing

Copying may be valuable for learning math (see the story of Kunihiko Kodaira for more details), but always remember to copy with your heart - with you ......

Kotlin Notes - 2

Properties in Kotlin classes can be declared either as mutable, using the var keyword, or as read-only, using the val keyword. // full syntax for decl ......
Kotlin Notes

Chen Shuo's Practical Network Programming - TTCP Lecture代码注释

下面是C语言版本的TTCP,主要注释的是void receive(const Options& opt);函数,负责在服务器接收客户端发送的数据: // muduo/examples/ace/ttcp/ttcp_blocking.cc #include ... // 接受新的TCP连接 static ......
注释 Programming Practical Network Lecture

CodeForces 1895E Infinite Card Game

洛谷传送门 CF 传送门 容易转化成经典的有向图博弈模型。每张牌建一个点,若 \(x\) 能打败 \(y\) 就连一条 \(x \to y\) 的边。入度为 \(0\) 的点为必败态,之后类似拓扑排序倒推即可。 具体就是若存在边 \(u \to v\),若 \(u\) 为必败态则 \(v\) 为必胜 ......
CodeForces Infinite 1895E 1895 Card

CF467B Fedor and New Game

前言 传送门 本题思维难度:橙。 本题代码难度:橙或红。 综合难度:橙。 本人代码码量位居第二,但是呢,我的空格多,所以,还不来看一下? 题意 根据题目,若两人一人有 $j$,一人没 $j$,则异或后,第 $j$ 位为 $1$。 那么,题目转化为:已知有 $m + 1$ 个数,求出满足 $a_i$ ......
Fedor 467B Game 467 and

Kotlin Notes - 1

A class in Kotlin has a primary constructor and possibly one or more secondary constructors. // primary constructor class Person(val name: String) { v ......
Kotlin Notes

[EC Final 2022] Chase Game

题目传送门 一开始就想着整个过程,觉得逃跑的那个人的路线要考虑好多,包括路径长度,是否脱离追击者的范围要受到额外伤害等等。比较复杂没想明白。 后来发现,可以划分成两个阶段,即追击者传送前后。传送后逃跑者肯定走最短路线最优,因为和追击者的距离变化已经完全固定了,并且传送后的代价可以通过dijk预处理实 ......
Chase Final 2022 Game EC

Codeforces Round 428 (Div. 2) B. Game of the Rows

题目链接 题面翻译 现在有 \(K\) 个队,飞机有 \(N\) 排座位,每排能坐 \(8\) 个人,不同队伍的人不能坐相邻的位置。 相邻情况有 \(5\) 种 \((1, 2), (3, 4), (4, 5), (5, 6), (7, 8)\)。请问这 \(n\) 排座位是否够坐。 (\(K\) ......
Codeforces Round Game Rows 428

神经网络基础篇:关于 python_numpy 向量的说明(A note on python or numpy vectors)

关于 python_numpy 向量的说明 主要讲Python中的numpy一维数组的特性,以及与行向量或列向量的区别。并说一下在实际应用中的一些小技巧,去避免在coding中由于这些特性而导致的bug Python的特性允许使用广播(broadcasting)功能,这是Python的numpy程序 ......

[LeetCode] 1535. Find the Winner of an Array Game

Given an integer array arr of distinct integers and an integer k. A game will be played between the first two elements of the array (i.e. arr[0] and a ......
LeetCode Winner Array 1535 Find