game

CF1411G No Game No Life

猜它是一个 multi-sg,只用算出每个位置的 sg 值。不过注意到这是一个图,你要求 mex 肯定不会太大,毛咕咕一下不会超过 $\sqrt{m}$。并且根据均摊,你求 mex 的复杂度是 $O(m)$ 的。接下来相当于你有一个数 $v$ 每次选一个点异或上它的 sg 值,求最后是 $0$ 的概 ......
1411G 1411 No Game Life

Games101-Cp4-Geometry

###几何表示方法 - 隐式表达 对应通过隐函数表示点的相对位置,而不是空间的具体位置。具体有:代数公式、水平集、分形/自相似(fractals)、CSG(constructive solid geometry):通过简单几何体的布尔运算获得复杂的几何体、距离函数:指的是到几何体点的最小距离,当两个 ......
Cp4-Geometry Geometry Games 101 Cp4

Games101-Cp3-Shading

Shading的过程就是对物体应用材质的过程。Shading$\not=$Shadow。着色模型不包括阴影。 ###Z-Buffering 深度缓存用于做深度测试时对深度进行比较。在$[0, 1]$之间取值。应该是可视范围与深度的相除? 在开启深度测试的时候,与深度缓存进行比较。如果小于对应像素的深 ......
Cp3-Shading Shading Games 101 Cp3

game

# 1 布局文件 activity_main ```html ``` # 2 控制文件 MainActivity ```java package com.example.game; import static java.lang.Math.abs; import androidx.appcompat ......
game

【转载】Game 1

# 奇葩贪吃蛇 ```cpp #include #include #include #include #include #include #include #define random(a,b) (rand() % (b-a+1))+ a; #define sr srand((unsigned)ti ......
Game

【转载】Game 2

# 改版五子棋 version 3.0 **更新日志:** 1. v1.0 修改了bug【源码来源:[链接](https://www.luogu.com.cn/discuss/344026) | yzmyyds】 2. v2.0 添加了command mode 3. v3.0 添加了脚本模式(~~代 ......
Game

games101 ray-tracing加速结构改进 BVH+SAH

加速结构改进 BVH + SAH 两者都是空间划分算法,使用这些算法是为了节省光线逐个与包围盒做交浪费的性能。 Bounding Volume Hierarchy BVH是基于图元(Primitive)的空间划分索引结构,划分物体再分别求他们的包围盒,这样就避免了一个同样的物体出现在不同的格子里。但 ......
ray-tracing tracing 结构 games 101

CodeForces 1839E Decreasing Game

[洛谷传送门](https://www.luogu.com.cn/problem/CF1839E "洛谷传送门") [CF 传送门](https://codeforces.com/problemset/problem/1839/E "CF 传送门") 不会,不知道该如何评价。确实是自己的问题。 这种 ......
CodeForces Decreasing 1839E 1839 Game

[ABC303G] Bags Game 解题分析

### 1 题目大意 **1.1 题目翻译** 有两个人轮流取物品。总共有 $n$ 个物品,第 $i$ 个物品的价值为 $w_i$。 他们按照下面的其中一种方式取物品: * 取出这一排物品最前面的或者最后面的。这一步没有代价。 * 设还剩下 $m$ 个物品,那么重复取出 $\min(B, m)$ 个 ......
303G Bags Game ABC 303

【每日一题】Problem 327A - Flipping Game

[原题](https://codeforces.com/problemset/problem/327/A) #### 解决思路 计算数字 "1" 的最大数目,可以转换成计算数组最大和,即求 $maxSum(oldArraySum - (1 \rightarrow 0) + (0 \rightarro ......
Flipping Problem 327A Game 327

[ABC166F] Three Variables Game

[Three Variables Game の 传送门](https://www.luogu.com.cn/problem/AT_abc166_f) ## Solution 首先,我们每次操作只会修改两个数。 所以考虑 dfs 枚举操作的顺序,但是这让时间复杂度变为 $O(2^n)$,不能接受。 但 ......
Variables Three 166F Game ABC

[ABC201D] Game in Momotetsu World 题解

[Game in Momotetsu World](https://www.luogu.com.cn/problem/AT_abc201_d) ### 题目大意 在一个 $n\times m$ 的网格中,存在红色和蓝色两种格子,红色格子用 `-` 表示,蓝色格子用 `+` 表示。 现在 Takaha ......
题解 Momotetsu World 201D Game

AtCoder Beginner Contest 258 G Grid Card Game

[洛谷传送门](https://www.luogu.com.cn/problem/AT_abc259_g "洛谷传送门") [AtCoder 传送门](https://atcoder.jp/contests/abc259/tasks/abc259_g "AtCoder 传送门") 记 $b_i = ......
Beginner AtCoder Contest Card Grid

[LeetCode] 1345. Jump Game IV 跳跃游戏之四

Given an array of integers `arr`, you are initially positioned at the first index of the array. In one step you can jump from index `i` to index: - `i ......
LeetCode 1345 Jump Game IV

【NSSCTF逆向】【2023题目】《doublegame》《fake_game》《easy_pyc》《For Aiur》

#题目doublegame ![](https://img2023.cnblogs.com/blog/3073714/202305/3073714-20230530162213556-1992980963.png) ##解法 感觉还是蛮抽象的一题 打开看看 ![](https://img2023.c ......
doublegame fake_game easy_pyc 题目 NSSCTF

AtCoder Beginner Contest 303 G Bags Game

[洛谷传送门](https://www.luogu.com.cn/problem/AT_abc303_g "洛谷传送门") [AtCoder 传送门](https://atcoder.jp/contests/abc303/tasks/abc303_g "AtCoder 传送门") 经典题,考虑区间 ......
Beginner AtCoder Contest Bags Game

死循环Game

package com.karl; import java.util.Random; import java.util.Scanner; public class GameDemo { public static void main(String[] args) { //1.生成一个随机号码 Ran ......
Game

Game on Paper 题解

[题目传送门](https://www.luogu.com.cn/problem/CF203B) 一道模拟题。 如果每涂一个格子就判断整个矩阵,那时间复杂度显然会炸。 我们每涂一个格子,影响的应该只是以这个格子为中心的 $3 \times 3$ 矩阵,判断以这些点为中心的话会不会涂出 $3 \tim ......
题解 Paper Game on

Games101——三角形随机均匀采样

assignment7中,使用了如上公式在三角形中采样,看着一头雾水,经过搜集资料,最终发现这是一个严谨的三角形随机均匀采样算法 选自 https://math.stackexchange.com/questions/18686/uniform-random-point-in-triangle-in ......
三角形 Games 101

计算机图形学入门——GAMES101第一课笔记

一、光栅化 将三维空间的几何形体显示在屏幕上,就是光栅化(Rasterization)。 虎书中有这么一段话: The process of finding all the pixels in an image that are occupied by a geometric primitive i ......
图形 计算机 笔记 GAMES 101

GAMES101 VS2019 2022环境配置

GAMES101 VS2019 2022环境配置 Eigen库的配置 在官网https://eigen.tuxfamily.org/index.php?title=Main_Page中下载Eigen库的zip格式。 将压缩包解压为eigen3同时解压到指定路径,我这里为D:\include\eige ......
环境 GAMES 2019 2022 101

Codeforces 914H - Ember and Storm's Tree Game(计数)

我这个低能儿怎么这个题调了这么久啊,废了/dk 非常烦的做法,不过也可以看看,代码也不算太难写( 首先注意到很诈骗的一件事情是,只要这个序列 $a$ 是单峰的或者单谷的(当然,递增递减序列也算在内),都恰有两种方式选择 $(i,op)$ 使得操作完后的序列的单调的,并且显然选树的 Ember 有必胜 ......
Codeforces Ember Storm 914H Game

Codeforces 280C Game on Tree

设 $p_i$ 为 $i$ 涂色或不涂色,$1$ 为涂,$0$ 为不涂,答案即为 $E[\sum_{i = 1}^n p_i]$ 然后转化一下柿子:$\sum_{i=1}^nE[p_i]$,这就很好求了,单独求每个点 $E[p_i]$ 的值就行了 考虑对于 $u$ 点,$p_u = 1$,即能被涂需 ......
Codeforces 280C Game Tree 280

AtCoder Regular Contest 122 D XOR Game

洛谷传送门 AtCoder 传送门 从高到低按位考虑。 设当前位有 $k$ 个 $1$。 如果 $k \bmod 2 = 0$,这意味着 Alice 如果选了一个数,Bob 可以选相同的数。发现可以分成 $(0,0),(1,1)$ 两组,递归下去即可。 如果 $k \bmod 2 = 1$,意味着答 ......
AtCoder Regular Contest Game 122

J - Simple Game (博弈论外壳下的模运算考察题目)

原题链接:https://vjudge.net/contest/555710#problem/J 手工翻译: Alice和Bob在玩一个游戏有这样一个数列a1,a2,a3,a4……an长度为n,他们轮流移走一个整数当数列中没有可移走的整数时游戏结束,Alice移走的数的和是S1,Bob移走的数的和是 ......
博弈论 外壳 题目 Simple Game

AtCoder Regular Contest 116 F Deque Game

洛谷传送门 AtCoder 传送门 很强的博弈 + 性质题。下文令 A 为 Takahashi,B 为 Aoki。 发现单独考虑一个序列 $a_1,a_2,...,a_n$: 若 $n \bmod 2 = 0$: 若 A 为先手,答案为 $\max(a_{\frac{n}{2}}, a_{\frac ......
AtCoder Regular Contest Deque Game

Game Engine Architecture(游戏引擎架构)

推荐序1 最初拿到《GameEngineArchitecture》一书的英文版,是编辑侠少邮寄给我的打印版。他建议我接下翻译此书的合同。当时我正在杭州带领一个团队开发3D游戏引擎,我和我的同事都对这本书的内容颇有兴趣,两大本打印的英文书立刻在同事间传开。可惜那段时间个人精力顾及不来,把近千页的英文读 ......
Architecture 架构 引擎 Engine Game

【攻防世界逆向】game详解难度3

#题目 #解法一 开始做的时候没思路,直接硬玩,玩出来了。 ......
难度 世界 game

题解:【CF235D】Graph Game

题目链接 根据期望的线性性,一次操作使得接下来要递归处理 $|G|$ 个点,将这些贡献分摊到 $|G|$ 个点上,这样我们接下来只需要计算概率。 首先考虑如果是树怎么做。操作等价于随机一个排列,顺次删掉排列中的点,并求出删掉当前点之前其所处的连通块的大小。记当前 $x$ 为点分治中心,点对 $(x, ......
题解 Graph 235D Game 235

CF1033G Chip Game 题解

传送门 CF1033G Chip Game 题目大意 有 $n$ 个石子堆,每堆有 $a_i$ 个石子。A 与 B 轮流取,A 每次只能取 $x$ 个,B 每次只能取 $y$ 个。 求对于所有 $x,y \in [1,m]$,A 必胜、B 必胜、先手必胜和后手必胜的数量。 $n \le 100,m ......
题解 1033G 1033 Chip Game