博客主页 所有文章 标签 关于我
img

Grimxiaojun

将成为优秀程序员的我

王小俊

个人站

欢迎来到我的个人站~


  • 博客主页
  • 所有文章
  • 标签
  • 关于我
  1. pat 甲级 1126

    1126. Eulerian Path (25)​ 时间限制​ 300 ms​ 内存限制​ 65536 kB​ 代码长度限制​ 16000 B​ 判题程序​ Standard​ 作者​ CHEN, YueIn graph theory, an Eulerian path is a path in a graph which visits every edge exactly once. Similarly, an ...…

    2017-03-07
    阅读全文 »

  2. pat 甲级 1125

    1125. Chain the Ropes (25)​ 时间限制​ 200 ms​ 内存限制​ 65536 kB​ 代码长度限制​ 16000 B​ 判题程序​ Standard​ 作者​ CHEN, YueGiven some segments of rope, you are supposed to chain them into one rope. Each time you may only fold t...…

    2017-03-07
    阅读全文 »

  3. pat 甲级 1124

    1124. Raffle for Weibo Followers (20)​ 时间限制​ 400 ms​ 内存限制​ 65536 kB​ 代码长度限制​ 16000 B​ 判题程序​ Standard​ 作者​ CHEN, YueJohn got a full mark on PAT. He was so happy that he decided to hold a raffle(抽奖) for his fol...…

    2017-03-07
    阅读全文 »

  4. 牛客网 剑指offer 求1的个数

    时间限制:1秒空间限制:32768K热度指数:6940**算法知识视频讲解题目描述求出1~13的整数中1出现的次数,并算出100~1300的整数中1出现的次数?为此他特别数了一下1~13中包含1的数字有1、10、11、12、13因此共出现6次,但是对于后面问题他就没辙了。ACMer希望你们帮帮他,并把问题更加普遍化,可以很快的求出任意非负整数区间中1出现的次数。代码如下:class Solution {public: int NumberOf1Between1AndN_Solutio...…

    2017-03-06
    阅读全文 »

  5. 牛客网 剑指offer 求1+2+3+..+n

    时间限制:1秒空间限制:32768K热度指数:7144**算法知识视频讲解题目描述求1+2+3+…+n,要求不能使用乘除法、for、while、if、else、switch、case等关键字及条件判断语句(A?B:C)。代码如下:class Solution {public: int Sum_Solution(int n) { if(n==1)return 1; return n+Sum_Solution(n-1); }};…

    2017-03-06
    阅读全文 »

  6. 牛客网 剑指offer 变态跳台阶

    时间限制:1秒空间限制:32768K热度指数:18367**算法知识视频讲解题目描述一只青蛙一次可以跳上1级台阶,也可以跳上2级……它也可以跳上n级。求该青蛙跳上一个n级的台阶总共有多少种跳法。f(n)=f(1)+f(2)+f(3)+…+f(n-2)+f(n-1);f(n-1)=f(1)+f(2)+f(3)+…+f(n-2);f(n)=2*f(n-1)代码如下:class Solution {public: int jumpFloorII(int number) { i...…

    2017-03-06
    阅读全文 »

  7. 牛客网 剑指offer 跳台阶

    时间限制:1秒空间限制:32768K热度指数:22143**算法知识视频讲解题目描述一只青蛙一次可以跳上1级台阶,也可以跳上2级。求该青蛙跳上一个n级的台阶总共有多少种跳法。代码如下:class Solution {public: int jumpFloor(int number) { if(number==1)return 1; if(number==2)return 2; int cnt=jumpFloor(number-1); ...…

    2017-03-06
    阅读全文 »

  8. 牛客网 剑指offer 斐波那契

    时间限制:1秒空间限制:32768K热度指数:19098题目描述大家都知道斐波那契数列,现在要求输入一个整数n,请你输出斐波那契数列的第n项。n<=39代码如下:class Solution {public: int Fibonacci(int n) { if(n<=0)return 0; if(n==1||n==2)return 1; return Fibonacci(n-1)+Fibonacci(n-2); }};…

    2017-03-06
    阅读全文 »

  9. 牛客网 剑指offer 6

    时间限制:3秒空间限制:32768K热度指数:16390本题知识点:查找题目描述把一个数组最开始的若干个元素搬到数组的末尾,我们称之为数组的旋转。​ 输入一个非递减排序的数组的一个旋转,输出旋转数组的最小元素。​ 例如数组{3,4,5,1,2}为{1,2,3,4,5}的一个旋转,该数组的最小值为1。​ NOTE:给出的所有元素都大于0,若数组大小为0,请返回0。代码如下:class Solution {public: int minNumberInRotateArray(vector...…

    2017-03-06
    阅读全文 »

  10. Pat 甲级 训练真题集 1076!

    1076. Forwards on Weibo (30)​ 时间限制​ 3000 ms​ 内存限制​ 65536 kB​ 代码长度限制​ 16000 B​ 判题程序​ Standard​ 作者​ CHEN, YueWeibo is known as the Chinese version of Twitter. One user on Weibo may have many followers, and may ...…

    2017-02-28
    阅读全文 »

  11. Pat 甲级 训练真题集 1075!

    1075. PAT Judge (25)​ 时间限制​ 200 ms​ 内存限制​ 65536 kB​ 代码长度限制​ 16000 B​ 判题程序​ Standard​ 作者​ CHEN, YueThe ranklist of PAT is generated from the status list, which shows the scores of the submittions. This time yo...…

    2017-02-28
    阅读全文 »

  12. Pat 甲级 训练真题集 1074!

    1074. Reversing Linked List (25)​ 时间限制​ 400 ms​ 内存限制​ 65536 kB​ 代码长度限制​ 16000 B​ 判题程序​ Standard​ 作者​ CHEN, YueGiven a constant K and a singly linked list L, you are supposed to reverse the links of every K ele...…

    2017-02-27
    阅读全文 »

  13. Pat 甲级 训练真题集 1063!

    1063. Set Similarity (25)​ 时间限制​ 300 ms​ 内存限制​ 65536 kB​ 代码长度限制​ 16000 B​ 判题程序​ Standard​ 作者​ CHEN, YueGiven two sets of integers, the similarity of the sets is defined to be Nc/Nt*100%, where Nc is the number...…

    2017-02-27
    阅读全文 »

  14. Pat 甲级 训练真题集 1062!

    1062. Talent and Virtue (25)​ 时间限制​ 200 ms​ 内存限制​ 65536 kB​ 代码长度限制​ 16000 B​ 判题程序​ Standard​ 作者​ CHEN, LiAbout 900 years ago, a Chinese philosopher Sima Guang wrote a history book in which he talked about peop...…

    2017-02-27
    阅读全文 »

  15. Pat 甲级 训练真题集 1061!

    1061. Dating (20)​ 时间限制​ 150 ms​ 内存限制​ 65536 kB​ 代码长度限制​ 16000 B​ 判题程序​ Standard​ 作者​ CHEN, YueSherlock Holmes received a note with some strange strings: “Let’s date! 3485djDkxh4hhGE 2984akDfkkkkggEdsb s&h...…

    2017-02-27
    阅读全文 »

  16. Pat 甲级 训练真题集 1057!

    1057. Stack (30)​ 时间限制​ 150 ms​ 内存限制​ 65536 kB​ 代码长度限制​ 16000 B​ 判题程序​ Standard​ 作者​ CHEN, YueStack is one of the most fundamental data structures, which is based on the principle of Last In First Out (LIFO). ...…

    2017-02-26
    阅读全文 »

  17. Pat 甲级 训练真题集 1056!

    1056. Mice and Rice (25)​ 时间限制​ 100 ms​ 内存限制​ 65536 kB​ 代码长度限制​ 16000 B​ 判题程序​ Standard​ 作者​ CHEN, YueMice and Rice is the name of a programming contest in which each programmer must write a piece of code to c...…

    2017-02-25
    阅读全文 »

  18. Pat 甲级 训练真题集 1055!

    1055. The World’s Richest (25)​ 时间限制​ 400 ms​ 内存限制​ 128000 kB​ 代码长度限制​ 16000 B​ 判题程序​ Standard​ 作者​ CHEN, YueForbes magazine publishes every year its list of billionaires based on the annual ranking of the wor...…

    2017-02-25
    阅读全文 »

  19. Pat 甲级 训练真题集 1045!

    1045. Favorite Color Stripe (30)​ 时间限制​ 200 ms​ 内存限制​ 65536 kB​ 代码长度限制​ 16000 B​ 判题程序​ Standard​ 作者​ CHEN, YueEva is trying to make her own color stripe out of a given one. She would like to keep only her fav...…

    2017-02-25
    阅读全文 »

  20. Pat 甲级 训练真题集 1044!

    1044. Shopping in Mars (25)​ 时间限制​ 100 ms​ 内存限制​ 65536 kB​ 代码长度限制​ 16000 B​ 判题程序​ Standard​ 作者​ CHEN, YueShopping in Mars is quite a different experience. The Mars people pay by chained diamonds. Each diamon...…

    2017-02-25
    阅读全文 »


← 最近 4 / 8 更早 →
  • Weibo
  • Github
  • RSS
  • Email

Copyright © 王小俊 2018 Theme by leopardpan |

本站总访问量 次