Description 给定一个正整数的集合A={a1,a2,….,an},是否可以将其分割成两个子集合,使两个子集合的数加起来的和相等。例A = { 1, 3, 8, 4, 10} 可以分割:{1, 8, 4} 及 {3, 10} Input 第一行集合元素个数n n ?300 第二行n个整数 # ...
分类:
其他好文 时间:
2021-04-22 16:10:11
阅读次数:
0
初识finally finally子句中的代码是最后执行的,并且是一定会执行的,即使try语句块中的代码出现了异常。 finally子句必须和try一起出现,不能单独使用。执行顺序:try→finally→return。 finally应用场景。 通常在finally语句块中完成资源的释放/关闭。 ...
分类:
其他好文 时间:
2021-04-22 16:08:18
阅读次数:
0
<UIDocumentPickerDelegate> @property (nonatomic, strong) UIDocumentPickerViewController *documentPickerVC; /** 初始化 UIDocumentPickerViewController 选文件啊 ...
分类:
其他好文 时间:
2021-04-22 16:03:31
阅读次数:
0
对象举例: class User { private String username; private List<Wife> wifes; } class Wife { } 1. 问题 封装出的List长度数据不正确 比如wifes数据应该有两条,但是查询出来只有一条 2. 原因 由于使用Mybat ...
分类:
其他好文 时间:
2021-04-22 15:52:34
阅读次数:
0
jdk10特性 局部类型推断 产生背景:开发者经常抱怨Java中引用代码的程度。局部变量的显示类型声明,常常被认为是是不必须的,给一个好听的名字经常可以很清楚的表达出下面应该怎样继续。 好处:减少了啰嗦和形式的代码,避免了信息冗余,而且对齐了变量名,更容易阅读! 使用:var关键字 测试 publi ...
分类:
其他好文 时间:
2021-04-22 15:46:06
阅读次数:
0
get请求的参数都在url里,post的请求相对于get请求多了个body部分 常见的 post 提交数据类型有四种: 1.第一种:application/json: 这是最常见的 json 格式,如{"input1":"xxx","input2":"ooo","remember":false} 2 ...
分类:
其他好文 时间:
2021-04-22 15:43:16
阅读次数:
0
SelectMany 一个序列的每个元素投影, 将平展为一个序列。结果延迟执行。 PetOwner[] petOwners ={ new PetOwner { Name="Higa, Sidney",Pets = new List<string>{ "Scruffy", "Sam" } }, new ...
分类:
其他好文 时间:
2021-04-22 15:43:01
阅读次数:
0
package operator;public class Demo01 { public static void main(String[] args) { //二元运算符 //ctrl + D : 复制当前行到下一行 int a = 10; int b = 20; int c = 25; int ...
分类:
其他好文 时间:
2021-04-22 15:42:24
阅读次数:
0
二进制水题~。 int n,m; int main() { cin>>n>>m; while(m--) { string s; cin>>s; int res=0; for(int i=0;i<s.size();i++) if(s[i] == 'n') res+=1<<(n-1-i); cout<< ...
分类:
其他好文 时间:
2021-04-22 15:39:34
阅读次数:
0
Given an m x n matrix, return all elements of the matrix in spiral order. Example 1: Input: matrix = [[1,2,3],[4,5,6],[7,8,9]] Output: [1,2,3,6,9,8,7, ...
分类:
其他好文 时间:
2021-04-22 15:34:12
阅读次数:
0