1 .text 2 .global _start 3 4 _start: 5 b reset /* vector 0 : reset */ 6 ldr pc, und_addr /* vector 4 : und 此时又跳回到4k flash中 */ 7 8 /* 这个操作是为了防止start.S超 ...
分类:
其他好文 时间:
2020-10-18 16:31:11
阅读次数:
22
//C++ class Solution { public: vector<int> finalPrices(vector<int>& prices) { vector<int> arr; int i,j; for(i=0; i<prices.size()-1; i++) { for(j=i+1; ...
分类:
其他好文 时间:
2020-10-18 10:18:43
阅读次数:
26
幂集,就是一个集合的所有子集,包括空集 下面附着代码,具体实现的过程代码下面: 各部分代码如下: 首先是 headF.h(headFile的意思) 1 #pragma once 2 3 #include<cstdio> 4 #include<vector> 5 6 using namespace s ...
分类:
其他好文 时间:
2020-10-13 17:14:00
阅读次数:
20
最短路变形题,加一维状态就好啦 $dist[i][j]$表示到达第$i$号点,到达时间为第$j$天的最短距离 判重数组要和$dist$数组一致 直接跑$dijkstra$即可 const int N=1010; vector<PII> g[N]; struct Node { int dis,u,da ...
分类:
其他好文 时间:
2020-10-10 17:45:26
阅读次数:
19
2019-2020 ICPC Northwestern European Regional Programming Contest (NWERC 2019) I-Inverted Deck #include<bits/stdc++.h> using namespace std; const int ...
分类:
其他好文 时间:
2020-10-07 20:36:52
阅读次数:
20
作者|Andy Reagan 编译|VK 来源|Towards Datas Science 在MATLAB和数值计算的世界,for循环被剪掉,而向量为王。 在我的博士学位期间,Lakoba教授的数值分析课是我参加的最具挑战性的课程之一,在课程之后,我对向量代码有了深刻的理解。 我最喜欢的向量化例子是 ...
分类:
其他好文 时间:
2020-10-06 20:14:19
阅读次数:
30
链接:https://leetcode-cn.com/problems/number-of-islands/ // flood fill class Solution { public: vector<vector<char>> g; int dx[4] = {-1, 0, 1, 0}, dy[4] ...
分类:
其他好文 时间:
2020-10-06 20:13:28
阅读次数:
25
103. 二叉树的锯齿形层次遍历 锯齿形层次遍历,思路与二叉树的层次遍历相同,稍微做点改动,区别在于此处使用的是双端队列,分别从前到后和从后到前地遍历二叉树。代码如下 vector<vector<int>> zigzagLevelOrder(TreeNode* root) { deque<TreeN ...
分类:
其他好文 时间:
2020-10-06 19:57:09
阅读次数:
25
#include<bits/stdc++.h> using namespace std; const int N = 300010; vector<int>p[N]; int ans[N]; int main() { int t; scanf("%d",&t); while(t --) { int ...
分类:
其他好文 时间:
2020-10-05 21:46:03
阅读次数:
23
https://leetcode-cn.com/problems/find-mode-in-binary-search-tree/ class Solution { public: int count = 0, max_count = 0; TreeNode* pre = NULL; vector< ...
分类:
其他好文 时间:
2020-09-24 22:11:03
阅读次数:
80