有一个结论: 当 $(1,1)$ 不能抵达 $(2,n)$ 时,必定存在一个点对,这两个点的值均为真,且坐标中的 $x$ 互异,$y$ 的差 $\leq 1$ 这个结论的正确性感觉非常显然,就不多说了。 下图可以形象地解释点对的位置关系。 那对于每个点的值,只要开一个数组 记录一下即可。 有了上述结 ...
分类:
其他好文 时间:
2020-01-20 09:40:13
阅读次数:
103
原题题面:https://codeforces.com/contest/1293/problem/C 题目大意: 有一个2*n的图 NEKO#ΦωΦ要带领mimi们从(1,1)的点走到(2,n)的点 每次会操作一个点,从可以通过到不可以通过,不可以通过到可以通过 每操作一次要回答一次NEKO#ΦωΦ ...
分类:
其他好文 时间:
2020-01-20 09:33:36
阅读次数:
53
题目链接:http://codeforces.com/contest/1293/problem/C 题意:给定n,q,即给定一个2*n的格子,有q个查询。 每个查询给定一个ri和ci,ri为1或2,ci在1到n之间,即给定一个(ri,ci),该点自该查询起状态进行转变(可经过/不可经过)。 如某个查 ...
分类:
其他好文 时间:
2020-01-20 09:28:01
阅读次数:
58
#include <bits/stdc++.h> #include<math.h> #include <string> using namespace std; const int maxn = 100010; struct Node{//定义静态链表 char data; int next; bo ...
分类:
其他好文 时间:
2020-01-18 21:26:50
阅读次数:
86
http://poj.org/problem?id=3710 在一棵树的基础上将某个点扩充为一个环,每个环满足与原先的树只有一个公共点,且不存在两个环共用一条边 在这样一张图上进行删边游戏 将环与原先的树的公共点称作该环的根 若环是偶环,则环的根SG=0,即先手面临一个独立的偶环必败。 因为先手删去 ...
分类:
其他好文 时间:
2020-01-18 01:32:35
阅读次数:
101
http://acm.hdu.edu.cn/showproblem.php?pid=3094 树上删边游戏 一条链的情况:SG分别是0,1,2,……,相当于Nim取石子游戏 那么把边看作石子,树可看做若干堆石子 所以叶节点的SG=0,其余节点的SG等于子节点SG+1的异或和 #include<cst ...
分类:
其他好文 时间:
2020-01-17 22:57:37
阅读次数:
97
Given an array of non-negative integers arr, you are initially positioned at start index of the array. When you are at index i, you can jump to i + ar ...
分类:
其他好文 时间:
2020-01-17 13:27:34
阅读次数:
62
原题链接在这里:https://leetcode.com/problems/24-game/ 题目: You have 4 cards each containing a number from 1 to 9. You need to judge whether they could operate ...
分类:
其他好文 时间:
2020-01-16 14:51:19
阅读次数:
97
【题目】题目链接 Two players take turns picking candies from n heaps,the player who picks the last one will win the game.On each turn they can pick any number ...
分类:
其他好文 时间:
2020-01-16 14:47:51
阅读次数:
57
博弈 Game 的分类维度 Deterministic or stochastic? One, two, or more players? Zero sum? Perfect information (can you see the state)? Adversarial Search 对抗搜索 A ...
分类:
其他好文 时间:
2020-01-16 11:01:47
阅读次数:
145