- 博客(26)
- 收藏
- 关注
原创 Combinatorial Game Theory - More examples
Combinatorial Game Theory - More examplesCatalogCombinatorial Game Theory - More examplesExample 1Problem StatementProblem AnalysisCode ImplementationExample 2Problem StatementProblem AnalysisCode ImplementationExample 3Problem StatementProblem AnalysisCo
2021-07-27 19:55:42
330
原创 Primes and Queries - Google Kickstart 2021 Round D
这里写自定义目录标题欢迎使用Markdown编辑器新的改变功能快捷键合理的创建标题,有助于目录的生成如何改变文本的样式插入链接与图片如何插入一段漂亮的代码片生成一个适合你的列表创建一个表格设定内容居中、居左、居右SmartyPants创建一个自定义列表如何创建一个注脚注释也是必不可少的KaTeX数学公式新的甘特图功能,丰富你的文章UML 图表FLowchart流程图导出与导入导出导入欢迎使用Markdown编辑器你好! 这是你第一次使用 Markdown编辑器 所展示的欢迎页。如果你想学习如何使用Mar
2021-07-12 17:54:59
271
原创 Combinatorial Game Theory
Combinatorical Game TheoryCatalogCombinatorical Game TheoryIntroductionNim's GameSprague-Grundy TheoremCorollaryLemma about Nim with increasesApplication of the theoremPatterns in Grundy valuesIntroductionfrom wikipediaCombinatorial game theory (CGT)
2021-06-23 11:17:40
341
原创 Square Free-Google Codejam 2021 Round 3
Square Free-Google Codejam 2021 Round 3第二题We have a matrix of square cells with R rows and C columns. We need to draw a diagonal in each cell. Exactly one of two possible diagonals must be drawn in each cell: the forward slash diagonal, which connects th
2021-06-09 16:25:40
271
1
原创 Pólya Enumeration Theorem(II)
Pólya Enumeration Theorem(II)Link to Part ICatalogPólya Enumeration Theorem(II)Orbit and stablizerOrbit-Stablizer TheoremBurnside's LemmaPólya Enumeration TheoremImplementationOrbit and stablizerLet us go back to our necklace with 6 beads. We can now a
2021-06-04 00:32:55
180
原创 Pólya Enumeration Theorem(I)
Pólya Enumeration TheoremCatalogPólya Enumeration TheoremIntroductionPreliminary knowledgePermutation GroupFixed PointsLagrange's Theorem in Group TheoryIntroductionIn high school combinatorics, we often encounter problems that require us to count the d
2021-05-29 10:40:21
234
原创 Rock Paper Scissors-Google Kickstart 2021 Round C
Rock Paper Scissors-Google Kickstart 2021 Round C第三题You and your friend like to play Rock Paper Scissors. Each day you play exactly 60 rounds and at the end of each day, you tally up the score from these 60 rounds.During each round, without any knowledg
2021-05-25 00:40:56
277
原创 Baby-step Giant-step and its extension
from wikipediaIn group theory, a branch of mathematics, the baby-step giant-step is a meet-in-the-middle algorithm for computing the discrete logarithm or order of an element in a finite abelian group due to Daniel Shanks. The discrete log problem is of
2021-05-19 09:53:58
260
2
原创 Retiling-Google Codejam 2021 Round 2
Retiling-Google Codejam 2021 Round 2第四题Cody-Jamal’s latest artistic installment is a tiled kitchen floor that can be retiled to different patterns. The floor consists of a matrix of R rows and C columns of square tiles. Each tile is reversible, one side
2021-05-16 12:57:05
316
原创 Truck Delivery - Google Kickstart Round B 2021
Truck Delivery - Google Kickstart Round B 2021第四题Charles is a truck driver in the city of Googleland. Googleland is built in form of a tree with N nodes where each node represents a city and each edge represents a road between two cities. The cities are
2021-05-13 18:43:25
362
原创 Primitive Root(Part II)
from wikipedia:In modular arithmetic, a number g is a primitive root modulo n if every number a coprime to n is congruent to a power of g modulo n. That is, g is a primitive root modulo n, if for every integer a coprime to n, there is some integer k for
2021-05-08 23:37:16
360
原创 Double or Noting - Google Codejam 2021 Round 1C
Double or Noting - Google Codejam 2021 Round 1C第三题You are given a starting non-negative integer S and an ending non-negative integer E. Both S and E are given by their binary representation (that is, they are given written in base 2). Your goal is to tra
2021-05-03 23:49:53
215
原创 Digit Blocks-Google Codejam 2021 Round 1B
Digit Blocks-Google Codejam 2021 Round 1B 第三题You are going to build N towers of B cubic blocks each, one block at a time. Towers are built bottom-up: the i-th block to be placed in a tower ends up as the i-th from the bottom. You need to decide where to
2021-05-02 22:51:17
283
2
原创 Hacked Exam-Google Codejam 2021 Round 1A
Hacked Exam-Google Codejam 2021 Round 1A第三题There is an exam with Q(1 ≤\leq≤ Q ≤\leq≤ 120)true or false questions. The correct answer to each question is either T or F. Each student taking the exam selects either T or F for each question, and the student’
2021-05-02 00:44:11
324
原创 Primitive Root(Part I)
from wikipedia:In modular arithmetic, a number g is a primitive root modulo n if every number a coprime to n is congruent to a power of g modulo n. That is, g is a primitive root modulo n, if for every integer a coprime to n, there is some integer k for
2021-04-26 20:01:41
321
原创 Max Flow-Min Cut Theorem
Max Flow-Min Cut Theoremfrom wikipediaIn computer science and optimization theory, the max-flow min-cut theorem states that in a flow network, the maximum amount of flow passing from the source to the sink is equal to the total weight of the edges in a
2021-04-17 00:33:55
320
原创 Fast Fourier Transform
Fast Fourier TransformThis is a classic problem in CS – to multiple two degree-n polynomials. The brute force way is obvious, but would cost us O(n2) time. Using the idea of FFT would enable us to do this in O(nlogn) time.In this blog entry, I will be fo
2021-04-11 23:08:50
181
原创 Möbius Inversion
Mobius InversionThis is an especially important method when dealing with functions that are difficult to sum, often it reduces the time complexity of the algorithm used from at least quadratic to linear(and even faster).In this blog entry, I will be focu
2021-03-31 23:23:52
252
1
原创 Checksum-Google Kick Start 2021 Round A
Kick Start 2021 Round A:ChecksumGrace and Edsger are constructing a N×N boolean matrix A. The element in i-th row and j-th column is represented by Ai,j. They decide to note down the checksum (defined as bitwise XOR of given list of elements) along each
2021-03-24 23:59:19
246
原创 Rabbit House- Google Kick Start 2021 Round A
Google Kick Start 2021 Round A: Rabbit HouseBarbara got really good grades in school last year, so her parents decided to gift her with a pet rabbit. She was so excited that she built a house for the rabbit, which can be seen as a 2D grid with R rows and
2021-03-24 23:16:11
291
原创 L-Shaped Plots - Google Kick Start 2021 Round A
Google Kick Start 2021 Round A:L-Shaped PlotsGiven a grid of R rows and C columns each cell in the grid is either 0 or 1.A segment is a nonempty sequence of consecutive cells such that all cells are in the same row or the same column. We define the len
2021-03-22 23:26:28
318
原创 K-Goodness String-Google Kick Start 2021 Round A
Google Kick Start 2021 Round A:K-Goodness StringCharles defines the goodness score of a string as the number of indices i such that Si≠SN−i+1 where 1≤i≤N/2 (1-indexed). For example, the string CABABC has a goodness score of 2 since S2≠S5 and S3≠S4. Char
2021-03-22 22:52:30
373
原创 USACO 2021 二月铂金组第一题 No Time To Dry
USACO 2020~2021 二月铂金组第一题No Time To DryBessie has recently received a painting set, and she wants to paint the long fence at one end of her pasture. The fence consists of N consecutive 1-meter segments (1≤N≤2⋅105). Bessie has N different colors available
2021-03-14 17:51:42
599
原创 USACO 2020~2021 February Contest GOLD 题解(3)
USACO 2020~2021 三月黄金组 题解(3)3. Count The CowsAs is typical, Farmer John’s cows have spread themselves out along his largest pasture, which can be regarded as a large 2D grid of square “cells” (picture a huge chessboard).The pattern of cows across the p
2021-03-07 23:50:44
812
1
原创 USACO 2020~2021 February Contest GOLD 题解(2)
USACO 2020~2021 三月黄金组 题解(2)2. Modern Art 3Having become bored with standard 2-dimensional artwork (and also frustrated at others copying her work), the great bovine artist Picowso has decided to switch to a more minimalist, 1-dimensional style. Her late
2021-03-07 16:10:09
764
原创 USACO 2020~2021 February Contest GOLD 题解(1)
USACO 2020~2021 三月黄金组 题解(1)1. Stone Game1. Stone GameBessie and Elsie are playing a game with N (1≤N≤105) piles of stones, where the i-th pile has ai stones for each 1≤i≤N (1≤ai≤106). The two cows alternate turns, with Bessie going first.First, Bessie
2021-03-07 15:42:01
1066
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人