02 2019 档案

摘要:https://ac.nowcoder.com/acm/contest/372#question A.救救猫咪 #include <bits/stdc++.h> using namespace std; const int maxn = 1e5 + 10; int N; struct Node { 阅读全文
posted @ 2019-02-24 14:06 _Zlrrr 阅读(239) 评论(1) 推荐(1)
摘要:http://acm.hdu.edu.cn/showproblem.php?pid=2087 Problem Description 一块花布条,里面有些图案,另有一块直接可用的小饰条,里面也有一些图案。对于给定的花布条和小饰条,计算一下能从花布条中尽可能剪出几块小饰条来呢? Input 输入中含有 阅读全文
posted @ 2019-02-24 13:24 _Zlrrr 阅读(249) 评论(0) 推荐(0)
摘要:https://pintia.cn/problem-sets/994805342720868352/problems/994805491530579968 Suppose a bank has K windows open for service. There is a yellow line in 阅读全文
posted @ 2019-02-23 11:56 _Zlrrr 阅读(328) 评论(0) 推荐(0)
摘要:https://pintia.cn/problem-sets/994805342720868352/problems/994805439202443264 Shopping in Mars is quite a different experience. The Mars people pay by 阅读全文
posted @ 2019-02-23 11:18 _Zlrrr 阅读(189) 评论(0) 推荐(0)
摘要:https://pintia.cn/problem-sets/994805342720868352/problems/994805347921805312 Given a syntax tree (binary), you are supposed to output the correspondi 阅读全文
posted @ 2019-02-22 12:05 _Zlrrr 阅读(191) 评论(0) 推荐(0)
摘要:https://pintia.cn/problem-sets/994805342720868352/problems/994805346063728640 There is a kind of balanced binary search tree named red-black tree in t 阅读全文
posted @ 2019-02-21 21:56 _Zlrrr 阅读(294) 评论(0) 推荐(0)
摘要:https://pintia.cn/problem-sets/994805342720868352/problems/994805346428633088 A vertex cover of a graph is a set of vertices such that each edge of th 阅读全文
posted @ 2019-02-21 21:52 _Zlrrr 阅读(312) 评论(0) 推荐(0)
摘要:https://pintia.cn/problem-sets/994805342720868352/problems/994805437411475456 Eva is trying to make her own color stripe out of a given one. She would 阅读全文
posted @ 2019-02-21 12:30 _Zlrrr 阅读(210) 评论(0) 推荐(0)
摘要:#include <iostream> #include <stdlib.h> #include <time.h> #include <stdio.h> using namespace std; class ErLingSiBa { private: int Map[4][4], tmp[4][4] 阅读全文
posted @ 2019-02-20 22:59 _Zlrrr 阅读(414) 评论(0) 推荐(0)
摘要:https://leetcode.com/problems/squares-of-a-sorted-array/ Given an array of integers A sorted in non-decreasing order, return an array of the squares o 阅读全文
posted @ 2019-02-20 22:57 _Zlrrr 阅读(177) 评论(0) 推荐(0)
摘要:https://leetcode.com/problems/add-digits/ Given a non-negative integer num, repeatedly add all its digits until the result has only one digit. Example 阅读全文
posted @ 2019-02-20 22:51 _Zlrrr 阅读(95) 评论(0) 推荐(0)
摘要:https://leetcode.com/problems/number-of-segments-in-a-string/ Count the number of segments in a string, where a segment is defined to be a contiguous 阅读全文
posted @ 2019-02-20 22:35 _Zlrrr 阅读(115) 评论(0) 推荐(0)
摘要:https://leetcode.com/problems/unique-morse-code-words/ International Morse Code defines a standard encoding where each letter is mapped to a series of 阅读全文
posted @ 2019-02-20 22:27 _Zlrrr 阅读(144) 评论(0) 推荐(0)
摘要:https://leetcode.com/problems/to-lower-case/ Implement function ToLowerCase() that has a string parameter str, and returns the same string in lowercas 阅读全文
posted @ 2019-02-20 22:09 _Zlrrr 阅读(166) 评论(0) 推荐(0)
摘要:https://leetcode.com/problems/rotated-digits/ X is a good number if after rotating each digit individually by 180 degrees, we get a valid number that 阅读全文
posted @ 2019-02-20 22:02 _Zlrrr 阅读(240) 评论(0) 推荐(0)
摘要:https://leetcode.com/problems/detect-capital/ Given a word, you need to judge whether the usage of capitals in it is right or not. We define the usage 阅读全文
posted @ 2019-02-20 21:38 _Zlrrr 阅读(113) 评论(0) 推荐(0)
摘要:https://leetcode.com/problems/ransom-note/ Given an arbitrary ransom note string and another string containing letters from all the magazines, write a 阅读全文
posted @ 2019-02-20 21:20 _Zlrrr 阅读(142) 评论(0) 推荐(0)
摘要:https://leetcode.com/problems/reverse-linked-list-ii/ Reverse a linked list from position m to n. Do it in one-pass. Note: 1 ≤ m ≤ n ≤ length of list. 阅读全文
posted @ 2019-02-20 21:10 _Zlrrr 阅读(121) 评论(0) 推荐(0)
摘要:https://leetcode.com/problems/reorder-list/ Given a singly linked list L: L0→L1→…→Ln-1→Ln,reorder it to: L0→Ln→L1→Ln-1→L2→Ln-2→… You may not modify th 阅读全文
posted @ 2019-02-20 15:32 _Zlrrr 阅读(102) 评论(0) 推荐(0)
摘要:https://leetcode.com/problems/k-diff-pairs-in-an-array/ Given an array of integers and an integer k, you need to find the number of unique k-diff pair 阅读全文
posted @ 2019-02-20 14:37 _Zlrrr 阅读(104) 评论(0) 推荐(0)
摘要:https://leetcode.com/problems/partition-list/ Given a linked list and a value x, partition it such that all nodes less than x come before nodes greate 阅读全文
posted @ 2019-02-20 14:02 _Zlrrr 阅读(93) 评论(0) 推荐(0)
摘要:https://vjudge.net/problem/HRBUST-1955 9 * 9 的 Sudoku 给每个格子标号 num 并且通过标号唯一确定格子的位置在 num / 9 行 num % 9 列 判断待定数字是不是在每行每列每宫中没有出现过 如果可以顺利搜索完所有格子 ans 标为 1 如 阅读全文
posted @ 2019-02-20 12:21 _Zlrrr 阅读(268) 评论(0) 推荐(0)
摘要:https://leetcode.com/problems/reverse-only-letters/ Given a string S, return the "reversed" string where all characters that are not a letter stay in 阅读全文
posted @ 2019-02-18 21:33 _Zlrrr 阅读(180) 评论(0) 推荐(0)
摘要:https://leetcode.com/problems/robot-return-to-origin/ There is a robot starting at position (0, 0), the origin, on a 2D plane. Given a sequence of its 阅读全文
posted @ 2019-02-17 17:08 _Zlrrr 阅读(216) 评论(0) 推荐(0)
摘要:https://pintia.cn/problem-sets/994805342720868352/problems/994805359372255232 Given a tree, you are supposed to tell if it is a complete binary tree. 阅读全文
posted @ 2019-02-17 15:39 _Zlrrr 阅读(136) 评论(0) 推荐(0)
摘要:https://pintia.cn/problem-sets/994805342720868352/problems/994805388447170560 A supply chain is a network of retailers(零售商), distributors(经销商), and su 阅读全文
posted @ 2019-02-17 14:46 _Zlrrr 阅读(371) 评论(0) 推荐(0)
摘要:https://pintia.cn/problem-sets/994805342720868352/problems/994805355987451904 A Binary Search Tree (BST) is recursively defined as a binary tree which 阅读全文
posted @ 2019-02-17 14:28 _Zlrrr 阅读(280) 评论(0) 推荐(0)
摘要:https://pintia.cn/problem-sets/994805342720868352/problems/994805372601090048 A family hierarchy is usually presented by a pedigree tree where all the 阅读全文
posted @ 2019-02-17 14:25 _Zlrrr 阅读(315) 评论(0) 推荐(0)
摘要:https://pintia.cn/problem-sets/994805342720868352/problems/994805379664297984 Indeed there are many different tourist routes from our city to Rome. Yo 阅读全文
posted @ 2019-02-16 22:25 _Zlrrr 阅读(240) 评论(0) 推荐(0)
摘要:https://pintia.cn/problem-sets/994805342720868352/problems/994805376476626944 A supply chain is a network of retailers(零售商), distributors(经销商), and su 阅读全文
posted @ 2019-02-15 12:24 _Zlrrr 阅读(326) 评论(0) 推荐(0)
摘要:https://pintia.cn/problem-sets/994805342720868352/problems/994805370650738688 Among all the factors of a positive integer N, there may exist several c 阅读全文
posted @ 2019-02-15 11:51 _Zlrrr 阅读(202) 评论(0) 推荐(0)
摘要:https://pintia.cn/problem-sets/994805342720868352/problems/994805343236767744 The task of this problem is simple: insert a sequence of distinct positi 阅读全文
posted @ 2019-02-15 11:30 _Zlrrr 阅读(707) 评论(0) 推荐(0)
摘要:https://pintia.cn/problem-sets/994805342720868352/problems/994805389634158592 The task of this problem is simple: insert a sequence of distinct positi 阅读全文
posted @ 2019-02-14 11:47 _Zlrrr 阅读(245) 评论(0) 推荐(0)
摘要:https://leetcode.com/problems/reverse-string-ii/ Given a string and an integer k, you need to reverse the first k characters for every 2k characters c 阅读全文
posted @ 2019-02-13 21:35 _Zlrrr 阅读(178) 评论(0) 推荐(0)
摘要:https://pintia.cn/problem-sets/994805342720868352/problems/994805464397627392 A traveler's map gives the distances between cities along the highways, 阅读全文
posted @ 2019-02-13 13:49 _Zlrrr 阅读(308) 评论(0) 推荐(0)
摘要:https://pintia.cn/problem-sets/994805342720868352/problems/994805466364755968 Given an increasing sequence S of N integers, the median is the number a 阅读全文
posted @ 2019-02-12 20:30 _Zlrrr 阅读(340) 评论(0) 推荐(0)
摘要:https://pintia.cn/problem-sets/994805342720868352/problems/994805480801550336 A Digital Library contains millions of books, stored according to their 阅读全文
posted @ 2019-02-12 20:18 _Zlrrr 阅读(460) 评论(0) 推荐(0)
摘要:https://leetcode.com/problems/rectangle-area/ Find the total area covered by two rectilinear rectangles in a 2D plane. Each rectangle is defined by it 阅读全文
posted @ 2019-02-12 13:26 _Zlrrr 阅读(148) 评论(0) 推荐(0)
摘要:https://pintia.cn/problem-sets/994805342720868352/problems/994805380754817024 An inorder binary tree traversal can be implemented in a non-recursive w 阅读全文
posted @ 2019-02-12 12:34 _Zlrrr 阅读(302) 评论(0) 推荐(0)
摘要:https://pintia.cn/problem-sets/994805342720868352/problems/994805381845336064 Given a sequence of positive integers and another positive integer p. Th 阅读全文
posted @ 2019-02-12 11:08 _Zlrrr 阅读(311) 评论(0) 推荐(0)
摘要:https://leetcode.com/problems/convert-sorted-list-to-binary-search-tree/ Given a singly linked list where elements are sorted in ascending order, conv 阅读全文
posted @ 2019-02-11 15:29 _Zlrrr 阅读(96) 评论(0) 推荐(0)
摘要:https://pintia.cn/problem-sets/994805342720868352/problems/994805402305150976 Eva loves to collect coins from all over the universe, including some ot 阅读全文
posted @ 2019-02-11 13:59 _Zlrrr 阅读(433) 评论(0) 推荐(0)
摘要:https://pintia.cn/problem-sets/994805342720868352/problems/994805404939173888 An AVL tree is a self-balancing binary search tree. In an AVL tree, the 阅读全文
posted @ 2019-02-11 11:53 _Zlrrr 阅读(451) 评论(0) 推荐(0)
摘要:http://acm.hdu.edu.cn/showproblem.php?pid=1166 Problem Description C国的死对头A国这段时间正在进行军事演习,所以C国间谍头子Derek和他手下Tidy又开始忙乎了。A国在海岸线沿直线布置了N个工兵营地,Derek和Tidy的任务就是 阅读全文
posted @ 2019-02-11 10:29 _Zlrrr 阅读(154) 评论(0) 推荐(0)
摘要:https://leetcode.com/problems/longest-uncommon-subsequence-i/ Given a group of two strings, you need to find the longest uncommon subsequence of this 阅读全文
posted @ 2019-02-09 17:36 _Zlrrr 阅读(205) 评论(0) 推荐(0)
摘要:https://leetcode.com/problems/insertion-sort-list/ Sort a linked list using insertion sort. A graphical example of insertion sort. The partial sorted 阅读全文
posted @ 2019-02-09 16:43 _Zlrrr 阅读(117) 评论(0) 推荐(0)
摘要:https://pintia.cn/problem-sets/994805342720868352/problems/994805417945710592 Stack is one of the most fundamental data structures, which is based on 阅读全文
posted @ 2019-02-09 16:30 _Zlrrr 阅读(169) 评论(0) 推荐(0)
摘要:https://pintia.cn/problem-sets/994805342720868352/problems/994805354762715136 British astronomer Eddington liked to ride a bike. It is said that in or 阅读全文
posted @ 2019-02-09 14:47 _Zlrrr 阅读(403) 评论(0) 推荐(0)
摘要:https://leetcode.com/problems/rotate-list/ Given a linked list, rotate the list to the right by k places, where k is non-negative. Example 1: Example 阅读全文
posted @ 2019-02-09 11:34 _Zlrrr 阅读(137) 评论(0) 推荐(0)
摘要:https://leetcode.com/problems/split-linked-list-in-parts/ Given a (singly) linked list with head node root, write a function to split the linked list 阅读全文
posted @ 2019-02-09 11:06 _Zlrrr 阅读(128) 评论(0) 推荐(0)
摘要:https://pintia.cn/problem-sets/994805342720868352/problems/994805362341822464 A supply chain is a network of retailers(零售商), distributors(经销商), and su 阅读全文
posted @ 2019-02-08 13:06 _Zlrrr 阅读(505) 评论(0) 推荐(0)
摘要:https://pintia.cn/problem-sets/994805342720868352/problems/994805363117768704 This time your job is to fill a sequence of N positive integers into a s 阅读全文
posted @ 2019-02-08 11:15 _Zlrrr 阅读(566) 评论(0) 推荐(0)
摘要:https://pintia.cn/problem-sets/994805342720868352/problems/994805427332562944 Given a stack which can keep M numbers at most. Push N numbers in the or 阅读全文
posted @ 2019-02-06 21:25 _Zlrrr 阅读(127) 评论(0) 推荐(0)
摘要:https://leetcode.com/problems/find-k-pairs-with-smallest-sums/ You are given two integer arrays nums1 and nums2 sorted in ascending order and an integ 阅读全文
posted @ 2019-02-06 11:17 _Zlrrr 阅读(132) 评论(0) 推荐(0)
摘要:https://pintia.cn/problem-sets/994805342720868352/problems/994805482919673856 A graph which is connected and acyclic can be considered a tree. The hig 阅读全文
posted @ 2019-02-06 02:01 _Zlrrr 阅读(127) 评论(0) 推荐(0)
摘要:https://pintia.cn/problem-sets/994805342720868352/problems/994805521431773184 A family hierarchy is usually presented by a pedigree tree. Your job is 阅读全文
posted @ 2019-02-05 13:08 _Zlrrr 阅读(143) 评论(0) 推荐(0)
摘要:https://pintia.cn/problem-sets/994805342720868352/problems/994805349851185152 In graph theory, an Eulerian path is a path in a graph which visits ever 阅读全文
posted @ 2019-02-05 11:49 _Zlrrr 阅读(136) 评论(0) 推荐(0)
摘要:import java.util.*; import java.math.*; public class Main{ public static void main(String args[]){ Scanner cin = new Scanner(System.in); BigInteger a, b; //以文件EOF结束 ... 阅读全文
posted @ 2019-02-03 20:47 _Zlrrr 阅读(1709) 评论(0) 推荐(0)
摘要:https://pintia.cn/problem-sets/994805342720868352/problems/994805507225665536 Given a pair of positive integers, for example, 6 and 110, can this equa 阅读全文
posted @ 2019-02-03 20:40 _Zlrrr 阅读(262) 评论(0) 推荐(0)
摘要:https://pintia.cn/problem-sets/994805342720868352/problems/994805345401028608 For a student taking the online course "Data Structures" on China Univer 阅读全文
posted @ 2019-02-01 13:26 _Zlrrr 阅读(520) 评论(0) 推荐(0)
摘要:https://pintia.cn/problem-sets/994805342720868352/problems/994805407749357568 A Binary Search Tree (BST) is recursively defined as a binary tree which 阅读全文
posted @ 2019-02-01 12:37 _Zlrrr 阅读(300) 评论(0) 推荐(0)