http://poj.org/problem?id=3126 https://www.bnuoj.com/v3/problem_show.php?pid=3245 题目鬼图 刚开始看到题目的图觉得这题会很鬼,然后看题,发现是水题... 线性筛预处理素数→BFS+记录深度 or 迭代加深 or 分层BFS // <3126.cpp> - 11/01/16 17:31:53 // This file is made by YJinpeng,created by XuYike's black tec…
题目如下: Given a matrix consisting of 0s and 1s, we may choose any number of columns in the matrix and flip every cell in that column. Flipping a cell changes the value of that cell from 0 to 1 or from 1 to 0. Return the maximum number of rows that hav…
题目如下: A string of '0's and '1's is monotone increasing if it consists of some number of '0's (possibly 0), followed by some number of '1's (also possibly 0.) We are given a string S of '0's and '1's, and we may flip any '0' to a '1' or a '1' to a '0'…
题目如下: For a binary tree T, we can define a flip operation as follows: choose any node, and swap the left and right child subtrees. A binary tree X is flip equivalent to a binary tree Y if and only if we can make X equal to Y after some number of flip…
作者: 负雪明烛 id: fuxuemingzhu 个人博客:http://fuxuemingzhu.cn/ 目录 题目描述 题目大意 解题方法 记忆化搜索 日期 题目地址:https://leetcode-cn.com/problems/flip-game-ii/ 题目描述 You are playing the following Flip Game with your friend: Given a string that contains only these two character…