- 博客(3)
- 收藏
- 关注
原创 CC++ 生成随机数
C/C++ 生成随机数1.生成随机数的范围为[0,RAND_MAX]例如[1,10]。#include <cstdio>#include <cstdlib>#include <cmath>#include <ctime>//RAND_MAX为stdlib.h文件中的一个常数,大小通常为32767int main(){ sra...
2020-01-10 22:07:01
274
原创 PAT甲级 1001 A+B Format
PAT甲级 1001 A+B FormatCalculate a+b and output the sum in standard format – that is, the digits must be separated into groups of three by commas (unless there are less than four digits).Input Specifi...
2019-12-19 22:20:55
144
原创 LeetCode 1. Two Sum
LeetCode 1. Two Sum一.题目分析1.要点:each input would have exactly one solutionnot use the same element twice2.散列定义:将元素通过一个函数转换为整型,使该整数可以尽量唯一的代表该元素例如:m[nums[i]] = i;//可以体现散列的思想,用空间换时间散列为什么能够加快查找速...
2019-12-18 19:39:13
147
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人