loj536「LibreOJ Round #6」花札(二分图博弈) loj 题解时间 很明显是二分图博弈。 以某个点为起点,先手必胜的充要条件是起点一定在最大匹配中。 判断方法是看起点到该点的边有流量且该点不在起点割集中。 #include<bits/stdc++.h> using namespac ...
分类:
其他好文 时间:
2020-07-15 23:11:15
阅读次数:
70
class QQEmail { public bool IsSetEmail(string FromAddress, string ToAddress, string Message,string Pwd) { MailAddress Address = new MailAddress(FromAd ...
原文链接:https://blog.csdn.net/maverick1990/article/details/37738601 定义排序函数: 方法1:声明外部比较函数 bool Less(const Student& s1, const Student& s2){ return s1.name ...
分类:
编程语言 时间:
2020-07-15 15:07:08
阅读次数:
73
Suppose you have a long flowerbed in which some of the plots are planted and some are not. However, flowers cannot be planted in adjacent plots - they ...
分类:
其他好文 时间:
2020-07-15 01:29:00
阅读次数:
68
链接:https://leetcode-cn.com/problems/word-search/ 代码 class Solution { public: bool exist(vector<vector<char>>& board, string word) { for (int i = 0; i ...
分类:
其他好文 时间:
2020-07-14 21:55:49
阅读次数:
84
1 增强for循环 增强for循环是JDK1.5以后出来的一个高级for循环,专门用来遍历数组和集合的。它的内部原理其实是个Iterator迭代器,所以在遍历的过程中,不能对集合中的元素进行增删操作。 格式: for(元素的数据类型 变量 : Collection集合or数组){ } 注意:新for ...
分类:
编程语言 时间:
2020-07-14 18:50:26
阅读次数:
85
1、执行单条cmd命令public static string ExecuteCmd(string command){ Process p = new Process(); p.StartInfo.FileName = "cmd.exe"; p.StartInfo.UseShellExecute =... ...
分类:
其他好文 时间:
2020-07-14 13:21:31
阅读次数:
54
Java 提供两种不同的类型:引用类型和原始类型(或内置类型)。比如:Int是java的原始数据类型,Integer是java为int提供的封装类。Java为每个原始类型提供了封装类,常见的原始与对应的封装类如下: 原始类型 封装类 boolean Boolean char Character by ...
分类:
编程语言 时间:
2020-07-14 01:02:09
阅读次数:
101
题目描述: 方法:动态规划 class Solution: def winnerSquareGame(self, n: int) -> bool: dp = [False, True, False] for x in range(3, n+1): dp.append(False) for y in ...
分类:
其他好文 时间:
2020-07-14 00:20:11
阅读次数:
68
这个题方向其实还算好找,就是枚举嘛 (这是一个填空题,所以六个for嵌套也无所谓,因为毕竟emmmm,不看时间) 这里是判断的代码: 需要把数字转化成字符串 void i2s(int x,string &s){//注意是个引用 stringsream ss; ss>>x; ss<<s; } bool ...
分类:
其他好文 时间:
2020-07-13 23:10:09
阅读次数:
92