Loading

上一页 1 ··· 29 30 31 32 33 34 35 36 37 ··· 74 下一页
摘要: Let's define the cost of a string 𝑠s as the number of index pairs i and j (1≤i<j<|s|) such that si=sj and si+1=sj+1. You are given two positive integ 阅读全文
posted @ 2021-04-14 09:18 脂环 阅读(94) 评论(0) 推荐(0) 编辑
摘要: 827. 最大人工岛 难度困难83 在二维地图上, 0代表海洋, 1代表陆地,我们最多只能将一格 0 海洋变成 1变成陆地。 进行填海之后,地图上最大的岛屿面积是多少?(上、下、左、右四个方向相连的 1 可形成岛屿) 示例 1: 输入: [[1, 0], [0, 1]] 输出: 3 解释: 将一格0 阅读全文
posted @ 2021-04-10 15:15 脂环 阅读(366) 评论(0) 推荐(0) 编辑
摘要: Codeforces Round #712 (Div. 2) A. Déjà Vu 暴力瞎搞即可,只有全a是不满足的,否则挑选a更多的一端加上a,当然也可以分别加a进行判断。 #include <bits/stdc++.h> using namespace std; int main() { int 阅读全文
posted @ 2021-04-06 23:47 脂环 阅读(72) 评论(0) 推荐(1) 编辑
摘要: macOS下使用bits/stdc++.h万能头文件 1. 终端中输入 echo | g++ -v -x c++ -E - #include <...> search starts here: /usr/local/include /Library/Developer/CommandLineTool 阅读全文
posted @ 2021-04-06 19:09 脂环 阅读(3034) 评论(1) 推荐(1) 编辑
摘要: 链接:https://ac.nowcoder.com/acm/contest/12548/J 来源:牛客网 题目描述 As a master of parallel computing, schwer is recently considering about the method to achie 阅读全文
posted @ 2021-04-06 12:01 脂环 阅读(318) 评论(0) 推荐(0) 编辑
摘要: 链接:https://ac.nowcoder.com/acm/contest/12548/I 来源:牛客网 题目描述 Mr. Main took a train from city ss to city tt and passed a plain full of windmills. The tra 阅读全文
posted @ 2021-04-05 20:52 脂环 阅读(339) 评论(0) 推荐(0) 编辑
摘要: Problem Statement Given is a sequence A of N integers. There are 2N−1 non-empty subsequences B of A. Find the sum of max(B)×min(B) over all of them. S 阅读全文
posted @ 2021-03-29 23:55 脂环 阅读(111) 评论(0) 推荐(0) 编辑
摘要: 深度学习经典模型RESNET解析 1. 理论基础 1. 残差学习概念 深度神经网络相当于函数的拟合过程(复合函数)。如果层数足够深,CNN可以拟合任何一个函数。 如果当网络的层数越来越深的时候,由于网络的退化现象(不妨假设拟合的是H(x)),难以训练出来。 那么可以改为训练$F(x) = H(x) 阅读全文
posted @ 2021-03-26 18:55 脂环 阅读(833) 评论(0) 推荐(0) 编辑
摘要: 给定一个字符串 s 和一个字符串 t ,计算在 s 的子序列中 t 出现的个数。 字符串的一个 子序列 是指,通过删除一些(也可以不删除)字符且不干扰剩余字符相对位置所组成的新字符串。(例如,"ACE" 是 "ABCDE" 的一个子序列,而 "AEC" 不是) 题目数据保证答案符合 32 位带符号整 阅读全文
posted @ 2021-03-17 16:56 脂环 阅读(62) 评论(0) 推荐(0) 编辑
摘要: 水题T*T class Solution { public: int a[25][25], dir[4][2] = {{0, 1}, {1, 0}, {0, -1}, {-1, 0}}; vector<vector<int>> generateMatrix(int n) { int x = 1, y 阅读全文
posted @ 2021-03-16 09:17 脂环 阅读(40) 评论(0) 推荐(0) 编辑
上一页 1 ··· 29 30 31 32 33 34 35 36 37 ··· 74 下一页