自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(5)
  • 收藏
  • 关注

原创 LeetCode 3. Longest Substring Without Repeating Characters

Given a string, find the length of thelongest substringwithout repeating characters.Example 1:Input: "abcabcbb"Output: 3 Explanation: The answer is"abc", with the length of 3. Example 2:...

2019-04-03 16:46:18 74 1

原创 LeetCode 2.Add Two Numbers

You are given twonon-emptylinked lists representing two non-negative integers. The digits are stored inreverse orderand each of their nodes contain a single digit. Add the two numbers and return i...

2019-04-03 16:23:20 70

原创 LeetCode 1. Two Sum

Given an array of integers, returnindicesof the two numbers such that they add up to a specific target.You may assume that each input would haveexactlyone solution, and you may not use thesame...

2019-04-03 15:58:29 68

原创 一个子串在另一个串中出现次数

题意:给n个字符串,问一个字符串是另一个字符串的子串的个数有多少解题思路:用map存下所有的字符串,然后用set处理出每个串的不同子串,在map里查询数量,注意要减去匹配自己的情况。#include<stdio.h>#include<algorithm>#include<iostream>#include<set>#include<ma...

2018-03-13 19:29:03 421

原创 A - Comunicating the Tibet Gym - 101492A

Gym - 101492A题意:有n个城市,一共有m条边,对每个城市编号,如果相邻城市的数小于等于k且不相等则输出所有城市编号,否则输出-1;题解:dfs,对于每个点,判断相邻的有没有填过当前数,如果填过则当前数不能填,如果所有的数都不能填则输出-1;#include<stdio.h>#include<algorithm>#include<iostream>...

2018-03-05 20:53:24 276

空空如也

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除