博弈
文章平均质量分 68
【杰杰】
这个作者很懒,什么都没留下…
展开
-
杭电9-Just another board game
传送门题意:给你一个n∗mn*mn∗m的网格,每个格子里有其相应的权重,最初有一个棋子在(1,1)(1,1)(1,1)上,棋子最终所在的位置为最终值,a想要最大化这个值,b要最小化这个值。思路:从整场比赛来看,如果某人不是最后一次移动棋子的那个人,那么他应该考虑的是:尽量让另一个人下次所能移动的最小/最大值最大/最小。例如,如果是b最后一次移动棋子(k为偶数),b想要最小化这个值,而a则需要将棋子移动到每一列的最小值最大的那一列,如果是a最后一次移动棋子(k为奇数),道理和上面差不多,最后只需要原创 2021-08-17 22:10:15 · 94 阅读 · 0 评论 -
牛客4 Just a joke
传送门思路:对于“线”来说,去掉一条边一定会留下一个点,这会使得轮次回到原来的状态,所以可以直接删除“线”,同理,环需要删除两次,点一次。#include<stdio.h>#include<iostream>#include<string.h>#include<algorithm>#include<map>#include<queue>#include<math.h>#include<set>原创 2021-08-01 00:09:39 · 69 阅读 · 0 评论 -
杭电多校3-Game on Plane
传送门题意:起初在二维平面上有n条直线,爱丽丝会选择k条直线,然后鲍勃画一条直线,爱丽丝想让鲍勃画出的直线与她选择的直线交点最多,而鲍勃想让交点最少,问当爱丽丝选择1到n条直线时,鲍勃画出的直线与之最小交点个数是多少。思路:对于两条直线来说,不相交则意味着一定平行(重合也算作平行),因此,鲍勃若是想让交点最小,则每次需要找到最多数量的相同斜率的直线,而爱丽丝则需要选择尽可能多的斜率不相等的直线。#include<bits/stdc++.h>using namespace std;原创 2021-07-28 20:42:34 · 150 阅读 · 0 评论 -
Codeforces Round #721 (Div. 2) B2. Palindrome Game (hard version)
传送门The only difference between the easy and hard versions is that the given string s in the easy version is initially a palindrome, this condition is not always true for the hard version.A palindrome is a string that reads the same left to right and righ原创 2021-05-21 18:09:04 · 271 阅读 · 0 评论 -
Codeforces Round #721 (Div. 2) B1. Palindrome Game (easy version)
传送门The only difference between the easy and hard versions is that the given string s in the easy version is initially a palindrome, this condition is not always true for the hard version.A palindrome is a string that reads the same left to right and righ原创 2021-05-21 00:14:46 · 227 阅读 · 1 评论