ICode9

精准搜索请尝试: 精确搜索
  • [leetcode数据库05] 196. 删除重复的电子邮箱2021-06-16 10:30:22

    leetcode数据库题目,简单题,面试中出现频率为45% 题目描述: 编写一个 SQL 查询,来删除 Person 表中所有重复的电子邮箱, 重复的邮箱里只保留 Id 最小 的那个。 +----+------------------+ | Id | Email | +----+------------------+ | 1 | john@example.com | | 2

  • Attention Is All You Need2021-06-13 16:33:43

    目录概主要内容Positional Encodingauto_regressive额外的细节代码 Vaswani A., Shazeer N., Parmar N., Uszkoreit J., Jones L., Gomez A. N., and Kaiser L. Attention is all you need. In Advances in Neural Information Processing Systems (NIPS), 2017. 概 Transformer

  • leetcode 438. 找到字符串中所有字母异位词-滑动窗口2021-06-12 16:02:07

    解题思路: 本题的思路和上一篇博客思路一样,都采用滑动窗口算法来解决字串问题,同样也是必须保持连续,那么需要在更新左指针的策略上做出调整 class Solution { public: vector<int> findAnagrams(string s, string p) { vector<int>res; unordered_m

  • Leecode:76. 最小覆盖子串2021-06-10 11:29:23

    给你一个字符串 s 、一个字符串 t 。返回 s 中涵盖 t 所有字符的最小子串。如果 s 中不存在涵盖 t 所有字符的子串,则返回空字符串 “” 。 注意:如果 s 中存在这样的子串,我们保证它是唯一的答案。 滑动窗口的思想: 用i , j分别表示滑动窗口的左右边界,滑动窗口的扩展收缩可以通

  • Attention Is All You Need2021-06-08 16:34:14

    https://arxiv.org/abs/1706.03762 -------------------------------------------------------- 2021-06-03                                                               encoder-decoder attention:对于某个时刻的输出y,它在输入x上各个部分的

  • 30. Substring with Concatenation of All Words (滑动窗口)2021-05-23 17:01:13

      给定一个字符串 s 和一些 长度相同 的单词 words 。找出 s 中恰好可以由 words 中所有单词串联形成的子串的起始位置。 注意子串要与 words 中的单词完全匹配,中间不能有其他字符 ,但不需要考虑 words 中单词串联的顺序。   示例 1: 输入:s = "barfoothefoobar

  • 【每日一题】32. 比赛 (DFS / 概率DP)2021-05-22 13:36:21

    补题链接:Here 【方案一:DFS】 首先我们可以计算出每道题做不出来的概率 \(unsolve[i] = (1 - a[i])(1- b[i])(1 - c[i])\) 然后因为只有 12 道题, 每道题要么做对要么做错, 我们可以做 \(DFS\) 当前做对的题数小于 \(need\) 的时候, 我们可以往对和不对的方向搜索 如果做对的题数

  • 567. 字符串的排列 (滑动窗口)2021-05-21 16:34:09

      给定两个字符串 s1 和 s2,写一个函数来判断 s2 是否包含 s1 的排列。 换句话说,第一个字符串的排列之一是第二个字符串的 子串 。   示例 1: 输入: s1 = "ab" s2 = "eidbaooo" 输出: True 解释: s2 包含 s1 的排列之一 ("ba"). 示例 2: 输入: s1= "ab" s2 = "eidboaoo

  • 矢量字体图标FontAwesome.WPF2021-05-13 17:35:20

    FontAwesome.WPF是对FontAwesome的封装。可能会比直接使用FontAwesome要方便一点。 项目网站:https://github.com/charri/Font-Awesome-WPF 安装: Install-Package FontAwesome.WPF 使用: <Window x:Class="Example.FontAwesome.WPF.Single" xmlns="http://schemas.micro

  • POJ - 1005 I Think I Need a Houseboat2021-05-07 17:04:50

    POJ 1005 - I Think I Need a Houseboat Description Fred Mapper is considering purchasing some land in Louisiana to build his house on. In the process of investigating the land, he learned that the state of Louisiana is actually shrinking by 50 square miles

  • 每日一题4.26-4.302021-04-26 20:59:47

    文章目录 4.26比赛 4.26比赛 NC14734 题目大意:给出12道题做出的概率,问做出0-12道题目的概率 /* 4.26 比赛 :https://ac.nowcoder.com/acm/problem/14734 对于每一个题目要么做出,要么做不出,利用dfs进行判断即可 // 还有一种dp做法,未完待续...... */ #include<bit

  • Understanding the need of Visitor Pattern2021-04-25 08:33:26

    Understanding the need of Visitor Pattern The visitor pattern is a solution to a more general design problem: I have a hierarchy of different classes. Each class supports various common operations. We would now like to extend that hierarchy, without havin

  • OS实验:多级队列调度算法2021-04-12 15:00:34

    实验 多级队列调度算法 设RQ分为RQ1和RQ2,RQ1采用轮转法,时间片q=7. RQ1>RQ2,RQ2采用短进程优先调度算法。 测试数据如下:RQ1: P1-P5, RQ2: P6-P10 进程P1P2P3P4P5P6P7P8P9P10运行时间1611141315211810714已等待时间6543212345 实现描述: typedef struct tag_pcb { char

  • 力扣76题(滑动窗口算法)2021-04-11 13:35:58

    76、最小覆盖子串 基本思想: 用left,right表示滑动窗口的左边界和右边界,通过改变left,right来扩展和收缩滑动窗口,可以想象成一个窗口在字符串上游走,当这个窗口包含的元素满足条件,即包含字符串T的所有元素,记录下这个滑动窗口的长度right-left+1,这些长度中的最小值就是要求的结果。 1

  • 手把手解决三道括号相关的算法题2021-04-07 10:01:11

    读完本文,你可以去力扣解决如下问题:20.有效的括号(Easy)921.使括号有效的最小插入(Medium)1541.平衡括号串的最少插入(Medium)判断合法括号串对括号的合法性判断多次在笔试中出现,现实中也很常见,比如说我们写的代码,编辑器会检查括号是否正确闭合。而且我们的代码可能会包含三种括号[](){},判

  • [AWS] Lab: Docker with CodeCommit & CodeBuild Part22021-04-07 03:32:25

    Continue with Part 1 Overview  Instead of manully build Docker image, this time, we use CodeBuild to build the Docker image for us. Update buildspec.yml We need to update `buildspec.yml` with the `View Push Commands` information. Then push the updates t

  • Need For Speed: Nodejs Module In C++2021-04-06 13:04:36

    转: Need For Speed: Nodejs Module In C++IntroductionThe reason can't be more simple: the need for speed.According to a simple test between node-uuid and C++ uuid, the truth was told: C++ is faster.The time consumptions of 1M generations of uuid is alm

  • 【操作系统原理】 多级队列调度算法(轮转算法和短进程优先算法)2021-04-05 11:29:25

    题目很简单,直接上代码: #include <iostream> #include <fstream> #include <string> using namespace std; typedef struct PCB { string name; int need; //运行需要的时间 int turn; //周转时间 PCB* next; //PCB结构体指针 PCB(string nam,int ned,int tur,P

  • CSS 长文本处理----文本一行和多行超出,省略号显示2021-03-31 14:01:20

    CSS 文本显示处理 默认:字符太长溢出了容器 <style media="screen"> #div { width: 200px; border: 1px solid red; } </style> <div id="div"> Most words art short & don't need to break.But Antidisestablishmentarianism i

  • Codeforces Round #710 (Div. 3) G. Maximize the Remaining String (字符串,枚举,序列自动机)2021-03-29 11:02:15

    题意:给你一个字符串,要求删去重复的字母,使得只剩下一个字母,那么最后的得到的字符串每个字母都只出现一次,问你怎么操作是的最后的字符串字典序最大. 题解:我们先用后缀和处理每个字母出现的次数,然后再用序列自动机预处理一下,首先我们先得到删去重复字母后字符串的长度,

  • idea报Server returns invalid timezone. Need to set ‘serverTimezone‘ property.错误2021-03-17 22:32:33

    链接mysql数据库出错 报错 报Server returns invalid timezone. Need to set ‘serverTimezone’ property.错误。 解决方案 在url后面添加:?serverTimezone=GMT%2B8

  • HDU1023.I NEED A OFFER!2021-03-14 20:01:30

    题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=1203 动态规划问题 思考:至少拿到一个offer就是可以拿到1,2,3…个offer的情况,而该情况是 1-不拿offer的情况。 求最大拿offer的概率==求最小不拿offer的概率 具体运算可以看dp变化表(适用于本题样品) #include<stdio.h> #inc

  • 【论文学习笔记】《Attention Is All You Need》2021-03-10 12:00:50

    《Attention Is All You Need》论文学习 文章目录 《Attention Is All You Need》论文学习  摘要  1 介绍  2 背景  3 模型架构    3.1 编码器和解码器堆栈    3.2 注意力      3.2.1 比例点积注意      3.2.2 多头注意      3.2.3 注意力在我们模型中的

  • 最小覆盖子串-滑动窗口2021-03-08 16:59:12

    链接: 最小覆盖字串. from collections import defaultdict class Solution: def minWindow(self, s: str, t: str) -> str: left,right = 0,0 minlen = float('INF') match = 0 start = 0 need = defaultdict(int)

  • 论文阅读笔记——Attention is all you need2021-03-07 21:57:16

    (!!!!事先声明!这不是技术分享贴!CSDN虽说都是大佬们的分享平台,但是我只是想把它当做是我的云笔记,内容不敢保证全部正确,风格也都只用自己能懂的大白话,写的时候当做日记记录心情,所以请不要随便评价别人日记写的如何如何,作者童心未泯脾气大,不接受批评,只接受表扬与讨论,不想看请移步大佬

专注分享技术,共同学习,共同进步。侵权联系[81616952@qq.com]

Copyright (C)ICode9.com, All Rights Reserved.

ICode9版权所有