你准备参加一场远足活动。给你一个二维 rows x columns 的地图 heights ,其中 heights[row][col] 表示格子 (row, col) 的高度。一开始你在最左上角的格子 (0, 0) ,且你希望去最右下角的格子 (rows-1, columns-1) (注意下标从 0 ...
分类:
其他好文 时间:
2020-10-26 11:13:12
阅读次数:
19
图论模板 最短路 Dijkstra struct HeapNode { int u; LL d; bool operator < (const HeapNode& rhs) const { return d > rhs.d; } }; bool done[maxn]; LL d[maxn]; voi ...
分类:
其他好文 时间:
2020-10-26 11:08:36
阅读次数:
22
数据结构与算法 大家都知道选择合适的数据结构将会显著地提升代码的性能。即使是像数组和集合这样相似的两种数据结构,在高负荷的运行环境下也会表现得天差地别。但是就算数据结构确定了,代码的速度也还会受另一重要因素影响,那就是算法。 那么数据结构与算法,到底难吗?说实话,难,因为很抽象,也复杂,再加上我们的 ...
分类:
编程语言 时间:
2020-10-19 23:05:28
阅读次数:
48
前言 spring框架部分的题目,是我根据Java Guide的面试突击版本V3.0再整理出来的,其中,我选择了一些比较重要的问题,并重新做出相应回答,并添加了一些比较重要的问题,希望对大家起到一定的帮助。 系列文章: 面试题-Java基础 面试题-Java集合 面试题-Java多线程基础、实现工具 ...
分类:
编程语言 时间:
2020-10-18 16:18:20
阅读次数:
16
1 #pragma once 2 #include <initializer_list> 3 struct String { 4 String(const char*s) { 5 c_str = new char[strlen(s)+1]; 6 while (*s) { 7 *(c_str+sz) ...
分类:
其他好文 时间:
2020-10-18 10:09:18
阅读次数:
18
题意简述: 给定一个长度为 \(n\) 的序列,支持 \(n\) 个操作 \(\text{I a b c}\) 表示将 \([a,b]\) 这一段区间的元素集体增加 \(c\); \(\text{R a b}\) 表示将 \([a,b]\) 区间内所有元素变成相反数; \(\text{Q a b c ...
分类:
其他好文 时间:
2020-10-18 10:08:55
阅读次数:
18
这是一道非常典型的off-by-one 先分析源码 create函数 先创建一个大小0x10大小的结构体,并且+0是大小,+8是指针 struct { size_t size; char* str; } edit函数 编辑结构体的str成员,它这里有个read_input函数,可以溢出单个字节 sh ...
分类:
其他好文 时间:
2020-10-18 09:22:22
阅读次数:
20
解决方法是: 1、“file”-“Project Structure” 2、选择自己jdk对应版本,然后apply-ok ...
分类:
其他好文 时间:
2020-10-16 11:05:21
阅读次数:
25
FIFO library The FIFO library provides a simple circular buffer implementation for storing bytes. The FIFO uses the size and buffer memory provided by ...
分类:
其他好文 时间:
2020-10-12 20:40:45
阅读次数:
29
1 class ClassType{ 2 public int num{get;set;} 3 } 4 5 struct StructType{ 6 public int num{get;set;} 7 } 8 9 static void Main(string[] args) 10 { 11 St ...