B. Johnny and His Hobbies 题意 给出n个数字,让找出最小的正整数k,使得这n个数字异或k之后,还是这n个数字。 思路 n以及n个数字都不大,直接暴力枚举k为1~1024。 代码 #include<bits/stdc++.h> #define pb push_back usi ...
分类:
其他好文 时间:
2020-06-08 19:06:51
阅读次数:
76
## vue 响应原理# 对象 1;对象新增的属性,不具有响应式。 2:对象本存在属性,具有响应式。 3: 属性是数组,数组的普通元素通过索引修改 不会进行响应式; 但如果数组元素也是一个对象,则该对象具有响应式。 4: 属性值是数组,通过调用push\splice\shift...具有响应式,并且... ...
分类:
其他好文 时间:
2020-06-08 13:00:18
阅读次数:
370
Given two sequences pushed and popped with distinct values, return true if and only if this could have been the result of a sequence of push and pop o ...
分类:
其他好文 时间:
2020-06-08 00:29:09
阅读次数:
53
设计一个支持 push ,pop ,top 操作,并能在常数时间内检索到最小元素的栈。 push(x) —— 将元素 x 推入栈中。 pop() —— 删除栈顶的元素。 top() —— 获取栈顶元素。 getMin() —— 检索栈中的最小元素。 示例: 输入: ["MinStack","push ...
分类:
其他好文 时间:
2020-06-07 13:18:40
阅读次数:
52
1、越界检查a[2] 数组不会检查越界,vector会检查越界 2、容器中不能存放引用vector, vector<int*>,vector<int&>(这种情况不可以) 引用是个别名,不是对象,不是对象不能往vector中放 3、比较少见的几种创建方式vector a(5, -1); // 初始化 ...
分类:
其他好文 时间:
2020-06-07 12:42:17
阅读次数:
90
之前自己在服务器上搭建了GitLab, 安装配置GitLab , 使其能web页面访问, pull, push, clone 等都成功了. ssh 形式要弄生成配置 ssh秘钥, 之前没弄过, 在网上查了一些文章博客, 有本地Windows电脑 生成配置的, 有在服务器Git 命令生成配置的. 然后 ...
分类:
其他好文 时间:
2020-06-07 12:31:24
阅读次数:
182
--提交代码 git push origin HEAD:refs/for/dev-safe%r=xxx.xx@xxx.xx.xx 回退已经提交的代码: git reset --soft HEAD~ git stashgit pullgit stash pop 代码没审批之前追加修改和提交git st ...
分类:
其他好文 时间:
2020-06-06 11:17:37
阅读次数:
72
题目 输入一个矩阵,按照从外向里以顺时针的顺序依次打印出每一个数字。 输入:matrix = [[1,2,3],[4,5,6],[7,8,9]] 输出:[1,2,3,6,9,8,7,4,5] class Solution { public: vector<int> spiralOrder(vecto ...
分类:
其他好文 时间:
2020-06-06 01:09:30
阅读次数:
92
模板一:单点修改,区间求和 模板题:hdu1166 敌兵布阵 const int maxn=100010; int a[maxn],tree[4*maxn]; void pushup(int o){ tree[o]=tree[o<<1]+tree[o<<1|1]; } void build(int ...
分类:
其他好文 时间:
2020-06-05 23:02:21
阅读次数:
96
1 #include <iostream> 2 #include <cstdio> 3 #include <algorithm> 4 #include <vector> 5 #include <queue> 6 using namespace std; 7 #define pb push_back ...
分类:
编程语言 时间:
2020-06-05 21:06:34
阅读次数:
63