int
-
A 子串查询 二分+模拟 看每个子串在主串中是否出现
链接:https://ac.nowcoder.com/acm/contest/28576/A来源:牛客网 题目描述 给出一个长度为n的字符串s和q个查询。对于每一个查询,会输入一个…
-
LeetCode 1151 Minimum Swaps to Group All 1's Together 滑动窗口
Given a binary array data, return the minimum number of swaps required to group all 1’s pr…
-
LeetCode 1901 Find a Peak Element II 二分
A peak element in a 2D grid is an element that is strictly greater than all of its adjacen…
-
LeetCode 325 Maximum Size Subarray Sum Equals k 贪心+Map
Given an integer array nums and an integer k, return the maximum length of a subarray that…
-
【数据库】实现批量快速插入大量数据的六种方案
一、(MySQL)通过函数/存储过程 1、链接 https://www.jb51.net/article/207999.htm https://blog.csdn.net/Flor…
-
C/C++ 分配内存的方法
1) malloc 函数: void *malloc(unsigned int size) 在内存的动态分配区域中分配一个长度为size的连续空间,如果分配成功,则返回所…
-
Linux系统编程001–系统IO
1. 文件系统:用来存储、组织、管理文件的一套方式、协议 2. 文件 文件的属性:i-node唯一表示一个文件的存在与否 文件的内容 3. Linux系统如何实现文件的操作? 硬件…
-
C++ 洛谷网站的题
P1000 #include <iostream> using namespace std; int main(int argc, char** argv) { cou…
-
Codeforces Round #761 (Div. 2) B. GCD Problem
B. GCD Problem 题目Link 题意 /(T (1 /le T /le 100000)/) 组数据,给定一个数字 /(n (10 /le n /le 10^9)/),请…
-
并查集
声明:与学校集训内容无关。 并查集是一种树形结构,基本的应用就是判断两个元素是否在同一个集合内,也可以将两个元素所在的集合合并。 举个奇怪的例子。 原理&代码实现+优化 假…