TIME IN PIECE

I MUST ASSEMBL THEM


  • 首页

  • 关于

  • 标签

  • 分类

  • 归档

  • 搜索

PAT-A-1088-Rational Arithmetic

发表于 2020-03-25 | 分类于 PAT-A | 评论数: | 热度: ℃
本文字数: 14k | 阅读时长 ≈ 12 分钟
or two rational numbers, your task is to implement the basic arithmetics, that is, to calculate their sum, difference, product and quotient. Input Spe ...
阅读全文 »

PAT-A-1081-Rational Sum

发表于 2020-03-25 | 分类于 PAT-A | 评论数: | 热度: ℃
本文字数: 8.6k | 阅读时长 ≈ 8 分钟
Given N rational numbers in the form numerator/denominator, you are supposed to calculate their sum. Input Specification:Each input file contains one ...
阅读全文 »

PAT-A-1049-Counting Ones

发表于 2020-03-25 | 分类于 PAT-A | 评论数: | 热度: ℃
本文字数: 3.9k | 阅读时长 ≈ 4 分钟
The task is simple: given any positive integer N, you are supposed to count the total number of 1’s in the decimal form of the integers from 1 to N. F ...
阅读全文 »

PAT-A-1008-Elevator

发表于 2020-03-25 | 分类于 PAT-A | 评论数: | 热度: ℃
本文字数: 4.4k | 阅读时长 ≈ 4 分钟
The highest building in our city has only one elevator. A request list is made up with N positive numbers. The numbers denote at which floors the elev ...
阅读全文 »

PAT-B-1049-数列的片段和

发表于 2020-03-25 | 分类于 PAT-B | 评论数: | 热度: ℃
本文字数: 2.9k | 阅读时长 ≈ 3 分钟
给定一个正数数列,我们可以从中截取任意的连续的几个数,称为片段。例如,给定数列 { 0.1, 0.2, 0.3, 0.4 },我们有 (0.1) (0.1, 0.2) (0.1, 0.2, 0.3) (0.1, 0.2, 0.3, 0.4) (0.2) (0.2, 0.3) (0.2, 0.3, 0 ...
阅读全文 »

基本数学问题

发表于 2020-03-24 | 评论数: | 热度: ℃
本文字数: 5.2k | 阅读时长 ≈ 5 分钟
最大公约数12345678int gcd(int a,int b){ if(b=0)return a; return gcd(b,a%b);}int gcd(int a,int b){ return !b? a:gcd(b,a%b);} 最小公倍数 ...
阅读全文 »

LeetCode-401-二进制手表

发表于 2020-03-23 | 分类于 LeetCode | 评论数: | 热度: ℃
本文字数: 4.6k | 阅读时长 ≈ 4 分钟
二进制手表顶部有 4 个 LED 代表小时(0-11),底部的 6 个 LED 代表分钟(0-59)。 每个 LED 代表一个 0 或 1,最低位在右侧。 例如,上面的二进制手表读取 “3:25”。 给定一个非负整数 n 代表当前 LED 亮着的数量,返回所有可能的时间。 案例: 12输入: n ...
阅读全文 »

EOJ-319-字符串出现次数

发表于 2020-03-22 | 分类于 EOJ | 评论数: | 热度: ℃
本文字数: 6.2k | 阅读时长 ≈ 6 分钟
定义函数 count(s,t),计算 t 在 s 中出现的次数。输入数据保证如有多个 t 的话,这些 t 不会相互重叠。 提示例如:ab 在 abcdabcd 中出现 2 次,aa 在 xyaabb 中出现 1 次,xy 在 x 中出现 0 次。只需按要求写出函数定义,并使用给定的测试程序测试你所定 ...
阅读全文 »

学习Kmp算法

发表于 2020-03-22 | 分类于 基础算法 | 评论数: | 热度: ℃
本文字数: 7.2k | 阅读时长 ≈ 7 分钟
  KMP算法是用于在文本串中判断是否存在子串(或称为模式串),并返回模式串在文本串中出现的位置的字符串算法。例如,文本串为text="caniwaitforyourheart",模式串为pattern="wait"。我们可以很直观的看到文 ...
阅读全文 »

LeetCode-90-子集II

发表于 2020-03-22 | 分类于 LeetCode | 评论数: | 热度: ℃
本文字数: 4.9k | 阅读时长 ≈ 4 分钟
给定一个可能包含重复元素的整数数组 nums,返回该数组所有可能的子集(幂集)。 说明:解集不能包含重复的子集。 示例: 12345678910输入: [1,2,2]输出:[ [2], [1], [1,2,2], [2,2], [1,2], []] Code12345678910111 ...
阅读全文 »
<<1…121314…25>>
wicherQAQ

wicherQAQ

阻塞/非阻塞式依据-进程是否需要等待执行结果

249 日志
36 分类
63 标签
RSS
GitHub E-Mail
Links
  • Baidu
  • GitHub
  • Gitee
  • CSDN
0%
© 2021 wicherQAQ | 445k | 6:45
总访问量次 | 总访客人