打得一手好铁

olliego.com
私信 关注
踢树叶
码龄5年

醉后不知天在水,满船清梦压星河

  • 85,488
    被访问量
  • 185
    原创文章
  • 42,010
    作者排名
  • 5
    粉丝数量
  • 于 2015-11-15 加入CSDN
获得成就
  • 获得27次点赞
  • 内容获得13次评论
  • 获得44次收藏
荣誉勋章
兴趣领域
  • #后端
    #Linux#Java#Redis#Spring Boot#分布式#Spring#MySQL
TA的专栏
  • AC路漫漫
    180篇
  • 寂寞百年身
    19篇
  • IDEA
    1篇
  • C++
    4篇
  • 最近
  • 文章
  • 资源
  • 问答
  • 课程
  • 帖子
  • 收藏
  • 关注/订阅

297. 二叉树的序列化与反序列化

序列化是将一个数据结构或者对象转换为连续的比特位的操作,进而可以将转换后的数据存储在一个文件或者内存中,同时也可以通过网络传输到另一个计算机环境,采取相反方式重构得到原数据。请设计一个算法来实现二叉树的序列化与反序列化。这里不限定你的序列 / 反序列化算法执行逻辑,你只需要保证一个二叉树可以被序列化为一个字符串并且将这个字符串反序列化为原始的树结构。示例:你可以将以下二叉树: 1 / \ 2 3 / \ 4 5序列化为 "[1,2,3,null,...
原创
42阅读
0评论
0点赞
发布博客于 8 月前

572. 另一个树的子树

给定两个非空二叉树 s 和 t,检验 s 中是否包含和 t 具有相同结构和节点值的子树。s 的一个子树包括 s 的一个节点和这个节点的所有子孙。s 也可以看做它自身的一棵子树。示例 1:给定的树 s: 3 / \ 4 5 / \1 2给定的树 t: 4 / \1 2返回 true,因为 t 与 s 的一个子树拥有相同的结构...
原创
46阅读
0评论
0点赞
发布博客于 10 月前

Leetcode 42 接雨水

给定 n 个非负整数表示每个宽度为 1 的柱子的高度图,计算按此排列的柱子,下雨之后能接多少雨水。上面是由数组 [0,1,0,2,1,0,1,3,2,1,2,1] 表示的高度图,在这种情况下,可以接 6 个单位的雨水(蓝色部分表示雨水)。 感谢 Marcos 贡献此图。示例:输入: [0,1,0,2,1,0,1,3,2,1,2,1]输出: 6对于数组中的每个元素,我们找出下雨...
原创
33阅读
0评论
0点赞
发布博客于 1 年前

LeetCode 232. Implement Queue using Stacks

Implement the following operations of a queue using stacks.push(x) -- Push element x to the back of queue. pop() -- Removes the element from in front of queue. peek() -- Get the front element. em...
原创
96阅读
0评论
0点赞
发布博客于 1 年前

LeetCode 657.Robot Return to Origin

There is a robot starting at position (0, 0), the origin, on a 2D plane. Given a sequence of its moves, judge if this robot ends up at (0, 0) after it completes its moves.The move sequence is repres...
原创
32阅读
0评论
0点赞
发布博客于 1 年前

LeetCode 219. Contains Duplicate II

Given an array of integers and an integer k, find out whether there are two distinct indices i and j in the array such that nums[i] = nums[j] and the absolute difference between i and j is at most k....
原创
29阅读
0评论
0点赞
发布博客于 1 年前

LeetCode 206. Reverse Linked List

Reverse a singly linked list.Example:Input: 1->2->3->4->5->NULLOutput: 5->4->3->2->1->NULLFollow up:A linked list can be reversed either iteratively or recursi...
原创
47阅读
0评论
0点赞
发布博客于 1 年前

LeetCode 203. Remove Linked List Elements

Remove all elements from a linked list of integers that have value val.Example:Input: 1->2->6->3->4->5->6, val = 6Output: 1->2->3->4->5//java/** * Definition...
原创
75阅读
0评论
0点赞
发布博客于 1 年前

LeetCode 198. House Robber

You are a professional robber planning to rob houses along a street. Each house has a certain amount of money stashed, the only constraint stopping you from robbing each of them is that adjacent house...
原创
30阅读
0评论
0点赞
发布博客于 1 年前

LeetCode 1295. Find Numbers with Even Number of Digits

Given an array nums of integers, return how many of them contain an even number of digits.Example 1:Input: nums = [12,345,2,6,7896]Output: 2Explanation: 12 contains 2 digits (even number of...
原创
524阅读
0评论
0点赞
发布博客于 1 年前

LeetCode 191. Number of 1 Bits

Write a function that takes an unsigned integer and returnthe number of '1'bits it has (also known as the Hamming weight).Example 1:Input: 00000000000000000000000000001011Output: 3Explanat...
原创
23阅读
0评论
0点赞
发布博客于 1 年前

LeetCode 172. Factorial Trailing Zeroes

Given an integer n, return the number of trailing zeroes in n!.Example 1:Input: 3Output: 0Explanation:3! = 6, no trailing zero.Example 2:Input: 5Output: 1Explanation:5! = 120, one trai...
原创
19阅读
0评论
0点赞
发布博客于 1 年前

LeetCode 169. Majority Element

Given an array of size n, find the majority element. The majority element is the element that appears more than ⌊ n/2 ⌋ times.You may assume that the array is non-empty and the majority element alwa...
原创
42阅读
0评论
0点赞
发布博客于 1 年前

LeetCode 167. Two Sum II - Input array is sorted

Given an array of integers that is already sorted in ascending order, find two numbers such that they add up to a specific target number.The function twoSum should return indices of the two numbers ...
原创
21阅读
0评论
0点赞
发布博客于 1 年前

LeetCode 155. Min Stack

Design a stack that supports push, pop, top, and retrieving the minimum element in constant time.push(x) -- Push element x onto stack. pop() -- Removes the element on top of the stack. top() -- Ge...
原创
34阅读
0评论
0点赞
发布博客于 1 年前

LeetCode 136. Single Number

Given a non-emptyarray of integers, every element appears twice except for one. Find that single one.Note:Your algorithm should have a linear runtime complexity. Could you implement it without us...
原创
43阅读
0评论
0点赞
发布博客于 1 年前

LeetCode 125. Valid Palindrome

Given a string, determine if it is a palindrome, considering only alphanumeric characters and ignoring cases.Note:For the purpose of this problem, we define empty string as valid palindrome.Examp...
原创
51阅读
0评论
0点赞
发布博客于 1 年前

LeetCode 122. Best Time to Buy and Sell Stock II

Say you have an array for which the ith element is the price of a given stock on day i.Design an algorithm to find the maximum profit. You may complete as many transactions as you like (i.e., buy on...
原创
39阅读
0评论
0点赞
发布博客于 1 年前

LeetCode 121. Best Time to Buy and Sell Stock

Say you have an array for which the ith element is the price of a given stock on day i.If you were only permitted to complete at most one transaction (i.e., buy one and sell one share of the stock),...
原创
23阅读
0评论
0点赞
发布博客于 1 年前

LeetCode 104. Maximum Depth of Binary Tree

Given a binary tree, find its maximum depth.The maximum depth is the number of nodes along the longest path from the root node down to the farthest leaf node.Note:A leaf is a node with no childre...
原创
38阅读
0评论
0点赞
发布博客于 1 年前

LeetCode 88. Merge Sorted Array

Given two sorted integer arrays nums1 and nums2, merge nums2 into nums1 as one sorted array.Note:The number of elements initialized in nums1 and nums2 are m and n respectively. You may assume tha...
原创
24阅读
0评论
0点赞
发布博客于 1 年前

LeetCode 53. Maximum Subarray

Given an integer array nums, find the contiguous subarray(containing at least one number) which has the largest sum and return its sum.Example:Input: [-2,1,-3,4,-1,2,1,-5,4],Output: 6Explanati...
原创
34阅读
0评论
0点赞
发布博客于 1 年前

LeetCode 804. Unique Morse Code Words

International Morse Code defines a standard encoding where each letter is mapped to a series of dots and dashes, as follows: "a" maps to ".-", "b" maps to "-...", "c" maps to "-.-.", and so on.For c...
原创
43阅读
0评论
0点赞
发布博客于 2 年前

LeetCode 279. Perfect Squares

Given a positive integer n, find the least number of perfect square numbers (for example, 1, 4, 9, 16, ...) which sum to n.Example 1:Input: n = 12Output: 3 Explanation: 12 = 4 + 4 + 4.Example...
原创
74阅读
0评论
0点赞
发布博客于 2 年前

LeetCode 1021. Remove Outermost Parentheses

A valid parentheses string is either empty (""), "(" + A + ")", or A + B, where A and B are valid parentheses strings, and + represents string concatenation. For example, "", "()", "(())()", and "(()...
原创
83阅读
0评论
0点赞
发布博客于 2 年前

LeetCode 27. Remove Element

Given an array nums and a value val, remove all instances of that value in-place and return the new length.Do not allocate extra space for another array, you must do this by modifying the input arra...
原创
28阅读
0评论
0点赞
发布博客于 2 年前

LeetCode 709. To Lower Case

Implement function ToLowerCase() that has a string parameter str, and returns the same string in lowercase.Example 1:Input: "Hello"Output: "hello"Example 2:Input: "here"Output: "here"...
原创
47阅读
0评论
0点赞
发布博客于 2 年前

LeetCode 938. Range Sum of BST

Given the root node of a binary search tree, return the sum of values of all nodes with value between L and R (inclusive).The binary search tree is guaranteed to have unique values.Example 1:...
原创
135阅读
0评论
0点赞
发布博客于 2 年前

LeetCode 771. Jewels and Stones

You're given strings J representing the types of stones that are jewels, and S representing the stones you have. Each character in S is a type of stone you have. You want to know how many of the sto...
原创
27阅读
0评论
0点赞
发布博客于 2 年前

LeetCode 26. Remove Duplicates from Sorted Array

Given a sorted array nums, remove the duplicates in-place such that each element appear only once and return the new length.Do not allocate extra space for another array, you must do this by modifyi...
原创
27阅读
0评论
0点赞
发布博客于 2 年前

LeetCode 21. Merge Two Sorted Lists

Merge two sorted linked lists and return it as a new list. The new list should be made by splicing together the nodes of the first two lists.Example:Input: 1->2->4, 1->3->4Output: 1-...
原创
20阅读
0评论
0点赞
发布博客于 2 年前

LeetCode 20. Valid Parentheses

Given a string containing just the characters '(', ')', '{', '}', '[' and ']', determine if the input string is valid.An input string is valid if:Open brackets must be closed by the same type of b...
原创
24阅读
0评论
0点赞
发布博客于 2 年前

LeetCode 14. Longest Common Prefix

Write a function to find the longest common prefix string amongst an array of strings.If there is no common prefix, return an empty string "".Example 1:Input: ["flower","flow","flight"]Output:...
原创
22阅读
0评论
0点赞
发布博客于 2 年前

LeetCode 13. Roman to Integer

Roman numerals are represented by seven different symbols:I, V, X, L, C, D and M.Symbol ValueI 1V 5X 10L 50C 100D ...
原创
23阅读
0评论
0点赞
发布博客于 2 年前

Spring MVC 和 Spring 总结

1. 为什么使用Spring ? 1). 方便解耦,简化开发 通过Spring提供的IoC容器,可以将对象之间的依赖关系交由Spring进行控制,避免硬编码所造成的过度程序耦合。 2). AOP编程的支持 通过Spring提供的AOP功能,方便进行面向切面的编程,如性能监测、事务管理、日志记录等。 3). 声明式事务的支持...
原创
37阅读
0评论
0点赞
发布博客于 2 年前

C++产生随机数

函数一:int rand(void);从srand (seed)中指定的seed开始,返回一个 ( seed, RAND_MAX(0x7fff))间的随机整数。函数二:void srand(unsigned seed);参数seed是rand()的种子,用来初始化rand()的起始值。大致过程如下:rand()在每次被调用的时,它会查看:(1)如果用户在此之前调用过...
原创
6863阅读
0评论
9点赞
发布博客于 2 年前

LeetCode 7. Reverse Integer

Given a 32-bit signed integer, reverse digits of an integer.Example 1:Input: 123Output: 321Example 2:Input: -123Output: -321Example 3:Input: 120Output: 21Note:Assume we are dea...
原创
33阅读
0评论
0点赞
发布博客于 2 年前

LeetCode 3. Longest Substring Without Repeating Characters

Given a string, find the length of the longest substring without repeating characters.Example 1:Input: "abcabcbb"Output: 3 Explanation: The answer is "abc", with the length of 3. Example 2:...
原创
38阅读
0评论
0点赞
发布博客于 2 年前

LeetCode 2. Add Two Numbers

You are given two non-empty linked lists representing two non-negative integers. The digits are stored in reverse order and each of their nodes contain a single digit. Add the two numbers and return i...
原创
55阅读
0评论
0点赞
发布博客于 2 年前

AWT组件中文显示乱码IDEA解决

Run/Edit Configurations左侧栏中选择对应的类,右侧进行运行配置修改VM options:-Dfile.encoding=gbk成功!
原创
1366阅读
8评论
7点赞
发布博客于 2 年前

PAT-A 1036. Boys vs Girls (25)

1036. Boys vs Girls (25) 时间限制 400 ms 内存限制 65536 kB 代码长度限制 16000 B 判题程序 Standard 作者 CHEN, Yue This tim...
原创
94阅读
0评论
0点赞
发布博客于 3 年前

PAT-A 1006. Sign In and Sign Out (25)

1006. Sign In and Sign Out (25) 时间限制 400 ms 内存限制 65536 kB 代码长度限制 16000 B 判题程序 Standard 作者 CHEN, Yue A...
原创
108阅读
1评论
0点赞
发布博客于 3 年前

PAT-A 1011. World Cup Betting (20)

1011. World Cup Betting (20) 时间限制 400 ms 内存限制 65536 kB 代码长度限制 16000 B 判题程序 Standard 作者 CHEN, Yue With...
原创
77阅读
0评论
0点赞
发布博客于 3 年前

PAT-B 1032. 挖掘机技术哪家强(20)

1032. 挖掘机技术哪家强(20) 时间限制 200 ms 内存限制 65536 kB 代码长度限制 8000 B 判题程序 Standard 作者 CHEN, Yue 为了用事实说明挖掘机技术到底哪...
原创
128阅读
0评论
0点赞
发布博客于 3 年前

PAT-B 1028. 人口普查(20)

1028. 人口普查(20) 时间限制 200 ms 内存限制 65536 kB 代码长度限制 8000 B 判题程序 Standard 作者 CHEN, Yue 某城镇进行人口普查,得到了全体居民的生...
原创
119阅读
0评论
0点赞
发布博客于 3 年前

PAT-B 1004. 成绩排名 (20)

1004. 成绩排名 (20) 时间限制 400 ms 内存限制 65536 kB 代码长度限制 8000 B 判题程序 Standard 作者 CHEN, Yue 读入n名学生的姓名、学号、成绩,分别...
原创
72阅读
0评论
0点赞
发布博客于 3 年前

PAT-B 1041. 考试座位号(15)

1041. 考试座位号(15) 时间限制 400 ms 内存限制 65536 kB 代码长度限制 8000 B 判题程序 Standard 作者 CHEN, Yue 每个PAT考生在参加考试时都会被分配...
原创
89阅读
0评论
0点赞
发布博客于 3 年前

PAT-A 1009. Product of Polynomials (25)

1009. Product of Polynomials (25) 时间限制 400 ms 内存限制 65536 kB 代码长度限制 16000 B 判题程序 Standard 作者 CHEN, Yue ...
原创
60阅读
0评论
0点赞
发布博客于 3 年前

PAT-A 1002. A+B for Polynomials (25)

1002. A+B for Polynomials (25) 时间限制 400 ms 内存限制 65536 kB 代码长度限制 16000 B 判题程序 Standard 作者 CHEN, Yue Th...
原创
45阅读
0评论
0点赞
发布博客于 3 年前

PAT-B 1010. 一元多项式求导 (25)

1010. 一元多项式求导 (25) 时间限制 400 ms 内存限制 65536 kB 代码长度限制 8000 B 判题程序 Standard 设计函数求一元多项式的导数。(注:xn(n为整数)的一阶导数为n*xn-1。)输入格式:以指数递降方...
原创
65阅读
0评论
0点赞
发布博客于 3 年前

PAT-A 1065. A+B and C (64bit) (20)

1065. A+B and C (64bit) (20) 时间限制 100 ms 内存限制 65536 kB 代码长度限制 16000 B 判题程序 Standard 作者 HOU, Qiming Gi...
原创
73阅读
0评论
0点赞
发布博客于 3 年前

PAT-A 1046. Shortest Distance (20)

1046. Shortest Distance (20) 时间限制 100 ms 内存限制 65536 kB 代码长度限制 16000 B 判题程序 Standard 作者 CHEN, Yue The ...
原创
81阅读
0评论
0点赞
发布博客于 3 年前

博尔赫斯《你不是别人》

《你不是别人》博尔赫斯你怯懦地祈助的别人的著作救不了你你不是别人,此刻你正身处自己的脚步编织起的迷宫的中心之地耶稣或者苏格拉底所经历的磨难救不了你就连日暮时分在花园里圆寂的佛法无边的悉达多也于你无益你手写的文字,口出的言辞都像尘埃一般一文不值命运之神没有怜悯之心上帝的长夜没有尽期你的肉体只是时光,不停流逝的时光你不过是每一个孤独的瞬息 The writings left behind by tho...
转载
2369阅读
0评论
1点赞
发布博客于 3 年前

PAT-A 1042. Shuffling Machine (20)

1042. Shuffling Machine (20) 时间限制 400 ms 内存限制 65536 kB 代码长度限制 16000 B 判题程序 Standard 作者 CHEN, Yue Shuf...
原创
72阅读
0评论
0点赞
发布博客于 3 年前

PAT-B 1018. 锤子剪刀布 (20)

1018. 锤子剪刀布 (20) 时间限制 100 ms 内存限制 65536 kB 代码长度限制 8000 B 判题程序 Standard 作者 CHEN, Yue 大家应该都会玩“锤子剪刀布”的游戏...
原创
99阅读
0评论
0点赞
发布博客于 3 年前

PAT-B 1012. 数字分类 (20)

1012. 数字分类 (20) 时间限制 100 ms 内存限制 65536 kB 代码长度限制 8000 B 判题程序 Standard 作者 CHEN, Yue 给定一系列正整数,请按要求对数字进行...
原创
76阅读
0评论
0点赞
发布博客于 3 年前

PAT-B 1008. 数组元素循环右移问题 (20)

一个数组A中存有N(N>0)个整数,在不允许使用另外数组的前提下,将每个整数循环向右移M(M>=0)个位置,即将A中的数据由(A0 A1……AN-1)变换为(AN-M …… AN-1 A0 A1……AN-M-1)(最后M个数循环移至最前面的M个位置)。如果需要考虑程序移动数据的次数尽量少,要如何设计移动的方法?输入格式:每个输入包含一个测试用例,第1行输入N ( 1<=N&l...
原创
95阅读
0评论
0点赞
发布博客于 3 年前

PAT-B 1046. 划拳(15)

划拳是古老中国酒文化的一个有趣的组成部分。酒桌上两人划拳的方法为:每人口中喊出一个数字,同时用手比划出一个数字。如果谁比划出的数字正好等于两人喊出的数字之和,谁就赢了,输家罚一杯酒。两人同赢或两人同输则继续下一轮,直到唯一的赢家出现。下面给出甲、乙两人的划拳记录,请你统计他们最后分别喝了多少杯酒。输入格式:输入第一行先给出一个正整数N(<=100),随后N行,每行给出一轮划拳的记录,格式...
原创
97阅读
0评论
0点赞
发布博客于 3 年前

PAT-B 1026. 程序运行时间(15)

要获得一个C语言程序的运行时间,常用的方法是调用头文件time.h,其中提供了clock()函数,可以捕捉从程序开始运行到clock()被调用时所耗费的时间。这个时间单位是clock tick,即“时钟打点”。同时还有一个常数CLK_TCK,给出了机器时钟每秒所走的时钟打点数。于是为了获得一个函数f的运行时间,我们只要在调用f之前先调用clock(),获得一个时钟打点数C1;在f执行完成后再调...
原创
61阅读
0评论
0点赞
发布博客于 3 年前

PAT-B 1016. 部分A+B (15)

1016. 部分A+B (15) 时间限制 100 ms 内存限制 65536 kB 代码长度限制 8000 B 判题程序 Standard 作者 CHEN, Yue 正整数A的“DA(为1位整数)部分...
原创
78阅读
0评论
0点赞
发布博客于 3 年前

PAT-B 1011. A+B和C (15)

1011. A+B和C (15) 时间限制 150 ms 内存限制 65536 kB 代码长度限制 8000 B 判题程序 Standard 作者 HOU, Qiming 给定区间[-231, 231...
原创
77阅读
0评论
0点赞
发布博客于 3 年前

Maximum Subsequence Sum

Maximum Subsequence SumGiven a sequence of KKK integers { N1N_1N​1​​, N2N_2N​2​​, ..., NKN_KN​K​​ }. A continuous subsequence is defined to be { NiN_iN​i​​, Ni+1N_{i+1}N​i+1​​, ..., NjN_
原创
190阅读
0评论
0点赞
发布博客于 4 年前

最大子列和问题

最大子列和问题给定KKK个整数组成的序列{N1N_1N​1​​,N2N_2N​2​​, ..., NKN_KN​K​​ },“连续子列”被定义为{ NiN_iN​i​​,Ni+1N_{i+1}N​i+1​​, ..., NjN_jN​j​​ },其中 1≤i≤j≤K1 \le i \le j \le K1≤i≤j≤K。“最大子列和”则被定义为所有连续子列
原创
237阅读
0评论
0点赞
发布博客于 4 年前

clock()函数模板

clock(): 捕捉从程序开始运行到clock()被调用时所耗费的时间。这个时间单位是clock tick,即“时钟打点”。常数CLK_TCK: 机器时钟每秒所走的时钟打点数。#include #include clock_t start, stop;/* clock_t是clock()函数返回的变量类型 */double duration;/* 记录被测函数运行时间,以秒为
原创
174阅读
0评论
0点赞
发布博客于 4 年前

PAT (Basic Level) Practise 1003. 我要通过!

1003. 我要通过!(20)时间限制 400 ms内存限制 65536 kB代码长度限制 8000 B判题程序 Standard 作者 CHEN, Yue“答案正确”是自动判题系统给出的最令人欢喜的回复。本题属于PAT的“答案正确”大派送 —— 只要读入的字符串满足下列条件,系统就输出“答案正
原创
229阅读
0评论
0点赞
发布博客于 4 年前

POJ 2371 Questions and answers

Questions and answersTime Limit: 1000MS Memory Limit: 65536KTotal Submissions: 11144 Accepted: 5922DescriptionThe database of the Pentagon contains a top-secret inf
原创
317阅读
0评论
0点赞
发布博客于 5 年前

CodeForces 445A DZY Loves Chessboard

A. DZY Loves Chessboardtime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard outputDZY loves chessboard, and he enjoys playing wi
原创
321阅读
0评论
0点赞
发布博客于 5 年前

CodeForces 495A Digital Counter

A. Digital Countertime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard outputMalek lives in an apartment block with 100 floors n
原创
388阅读
0评论
0点赞
发布博客于 5 年前

CodeForces 514B Han Solo and Lazer Gun

B. Han Solo and Lazer Guntime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard outputThere are n Imperial stormtroopers on the fi
原创
467阅读
0评论
0点赞
发布博客于 5 年前

CodeForces 427B Prison Transfer

B. Prison Transfertime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard outputThe prison of your city has n prisoners. As the pri
原创
262阅读
0评论
0点赞
发布博客于 5 年前

CodeForces 387A George and Sleep

A. George and Sleeptime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard outputGeorge woke up and saw the current time s on the d
原创
344阅读
0评论
0点赞
发布博客于 5 年前

CodeForces 617B Chocolate

B. Chocolatetime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard outputBob loves everything sweet. His favorite chocol
原创
222阅读
0评论
0点赞
发布博客于 5 年前

CodeForces 559A Gerald's Hexagon

A. Gerald's Hexagontime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputGerald got a very curious hexagon for h
原创
277阅读
0评论
0点赞
发布博客于 5 年前

CodeForces 592B The Monster and the Squirrel

B. The Monster and the Squirreltime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard outputAri the monster always wakes up very e
原创
343阅读
0评论
0点赞
发布博客于 5 年前

CodeForces 508A Pasha and Pixels

A. Pasha and Pixelstime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputPasha loves his phone and also putting his hair u
原创
218阅读
0评论
0点赞
发布博客于 5 年前

CodeForces 233A Perfect Permutation

A. Perfect Permutationtime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputA permutation is a sequence of integersp1, p
原创
461阅读
0评论
0点赞
发布博客于 5 年前

CodeForces 439B Devu, the Dumb Guy

B. Devu, the Dumb Guytime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard outputDevu is a dumb guy, his learning curve is very s
原创
267阅读
0评论
0点赞
发布博客于 5 年前

CodeForces 599A Patrick and Shopping

A. Patrick and Shoppingtime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard outputToday Patrick waits for a visit from his frien
原创
230阅读
0评论
0点赞
发布博客于 5 年前

CodeForces 200B Drinks

B. Drinkstime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputLittle Vasya loves orange juice very much. That's why any f
原创
406阅读
0评论
0点赞
发布博客于 5 年前

CodeForces 459B Pashmak and Flowers

B. Pashmak and Flowerstime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard outputPashmak decided to give Parmida a pair of flowe
原创
286阅读
0评论
0点赞
发布博客于 5 年前

CodeForces 560A Currency System in Geraldion

A. Currency System in Geraldiontime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputA magic island Geraldion, where Geral
原创
346阅读
0评论
0点赞
发布博客于 5 年前

CodeForces 507A Amr and Music

A. Amr and Musictime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard outputAmr is a young coder who likes music a lot. He always
原创
281阅读
0评论
0点赞
发布博客于 5 年前

HDU 5479 Scaena Felix

Scaena FelixTime Limit: 2000/1000 MS (Java/Others)    Memory Limit: 65536/65536 K (Java/Others)Total Submission(s): 759    Accepted Submission(s): 321Problem DescriptionGiven a parenth
原创
177阅读
0评论
0点赞
发布博客于 5 年前

HDU 5494 Card Game

Card GameTime Limit: 2000/1000 MS (Java/Others)    Memory Limit: 65536/65536 K (Java/Others)Total Submission(s): 762    Accepted Submission(s): 476Problem DescriptionSoda and Beta are
原创
164阅读
0评论
0点赞
发布博客于 5 年前

HDU 5640 King's Cake

King's CakeTime Limit: 2000/1000 MS (Java/Others)    Memory Limit: 65536/65536 K (Java/Others)Total Submission(s): 233    Accepted Submission(s): 190Problem DescriptionIt is the king's b
原创
198阅读
0评论
0点赞
发布博客于 5 年前

奥克塔维奥·帕斯《诗人的墓志铭》

《诗人的墓志铭》【墨西哥】奥克塔维奥·帕斯(1914-1998)他要歌唱,为了忘却真正生活的虚伪,为了记住虚伪生活的真实。
转载
1396阅读
0评论
0点赞
发布博客于 5 年前

PAT (Basic Level) Practise 1002. 写出这个数

1002. 写出这个数 (20)时间限制 400 ms内存限制 65536 kB代码长度限制 8000 B判题程序 Standard 作者 CHEN, Yue读入一个自然数n,计算其各位数字之和,用汉语拼音写出和的每一位数字。输入格式:每个测试输入包含1个测试用例,即给出自然数n的值。这里保
原创
213阅读
0评论
0点赞
发布博客于 5 年前

PAT (Basic Level) Practise 1001. 害死人不偿命的(3n+1)猜想

1001. 害死人不偿命的(3n+1)猜想 (15)时间限制 400 ms内存限制 65536 kB代码长度限制 8000 B判题程序 Standard 作者 CHEN, Yue卡拉兹(Callatz)猜想:对任何一个自然数n,如果它是偶数,那么把它砍掉一半;如果它是奇数,那么把(3n+1)
原创
192阅读
0评论
0点赞
发布博客于 5 年前

CodeForces 31B Sysadmin Bob

B. Sysadmin Bobtime limit per test0.5 secondmemory limit per test256 megabytesinputstandard inputoutputstandard outputEmail address in Berland is a string of the form A@B
原创
788阅读
0评论
0点赞
发布博客于 5 年前

vector<string>字符串容器介绍

#include#includeusing namespace std;int main(){    vectorvec;//定义个一个字符串容器    vectorhi;    string str;    str="abc";    vec.push_back(str);//把字符串str压进容器    vec.push_back("def");//把字
原创
12392阅读
1评论
9点赞
发布博客于 5 年前

CodeForces 132A Turing Tape

#include#include#include#include#includeusing namespace std;char c[1200];int i,j,k,l,n,m,x,y,lans;int main(){ gets(c+1); n=strlen(c+1); lans=0; for(i=1;i<=n;i++){ x=c[i]; y=0; for(
原创
242阅读
0评论
0点赞
发布博客于 5 年前

CodeForces 44B Cola

B. Colatime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputTo celebrate the opening of the Winter Computer School the or
原创
208阅读
0评论
0点赞
发布博客于 5 年前

CodeForces 38B Chess

B. Chesstime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputTwo chess pieces, a rook and a knight, stand on a standard c
原创
347阅读
0评论
0点赞
发布博客于 5 年前

CodeForces 56B Spoilt Permutation

B. Spoilt Permutationtime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputVasya collects coins: he has exactly one coin f
原创
326阅读
0评论
0点赞
发布博客于 5 年前

CodeForces 47B Coins

B. Coinstime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputOne day Vasya came across three Berland coins. They didn't h
原创
559阅读
0评论
0点赞
发布博客于 5 年前

CodeForces 46B T-shirts from Sponsor

B. T-shirts from Sponsortime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputOne day a well-known sponsor of a well-known
原创
479阅读
0评论
0点赞
发布博客于 5 年前

CodeForces 50B Choosing Symbol Pairs

B. Choosing Symbol Pairstime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputThere is a given string S consisting ofN s
原创
1170阅读
0评论
0点赞
发布博客于 5 年前

HDU 5630 Rikka with Chess

Rikka with ChessTime Limit: 2000/1000 MS (Java/Others)    Memory Limit: 65536/65536 K (Java/Others)Total Submission(s): 41    Accepted Submission(s): 37Problem DescriptionYuta gives Rikk
原创
283阅读
0评论
0点赞
发布博客于 5 年前

CodeForces 628A Tennis Tournament

A. Tennis Tournamenttime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard outputA tennis tournament with n participants is runnin
原创
240阅读
0评论
0点赞
发布博客于 5 年前

CodeForces 43B Letter

B. Lettertime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputVasya decided to write an anonymous letter cutting the lett
原创
1044阅读
0评论
0点赞
发布博客于 5 年前