Description Due to recent rains, water has pooled in various places in Farmer John's field, which is represented by a rectangle of N x M (1 <= N <= 10 ...
分类:
其他好文 时间:
2019-10-09 19:55:38
阅读次数:
105
题意: 输入一个正整数N(N<=2^30),输出从1到N共有多少个数字包括1。 代码: #define HAVE_STRUCT_TIMESPEC#include<bits/stdc++.h>using namespace std;int main(){ ios::sync_with_stdio(fa ...
分类:
其他好文 时间:
2019-10-02 11:05:35
阅读次数:
98
传送门 A - New Year and Counting Cards ?题意 有n张牌,正面有字母,反面有数字 其中元音字母$a,e,o,i,u$对应 ...
分类:
数据库 时间:
2019-10-01 22:30:53
阅读次数:
111
题意 有一排高楼,每一栋高楼有一个正整数高度,高度为 $i$ 的概率为 $2^{ i}$。 一栋楼的每层从下往上依次编号为 $0,1,2,\cdots,i 1$。 为了~~出题~~,大楼之间安装了溜索。在一栋楼的第 $i$ 层和另一栋楼的第 $i$ 层之间有一条溜索,当且仅当这两栋楼之间没有一栋大楼 ...
分类:
其他好文 时间:
2019-09-20 20:57:12
阅读次数:
66
D. Counting Sequences I 暴力搜索。 cpp include using namespace std; typedef long long ll; const int MOD = 1000000007; map, short m; vector vec; void calc(i ...
分类:
其他好文 时间:
2019-09-16 00:49:54
阅读次数:
147
附上:题目地址:https://leetcode-cn.com/problems/counting-bits/submissions/ 1:题目: 给定一个非负整数 num。对于 0 ≤ i ≤ num 范围中的每个数字 i ,计算其二进制数中的 1 的数目并将它们作为数组返回。 示例 1: 输入: ...
分类:
其他好文 时间:
2019-09-08 22:34:50
阅读次数:
132
1049 Counting Ones (30 分) 1049 Counting Ones (30 分) 1049 Counting Ones (30 分) The task is simple: given any positive integer N, you are supposed to co ...
分类:
其他好文 时间:
2019-09-07 22:40:16
阅读次数:
91
想到本质不同质因数不会很多就切了~ Code: ...
分类:
其他好文 时间:
2019-09-06 18:40:13
阅读次数:
208
A family hierarchy is usually presented by a pedigree tree. Your job is to count those family members who have no child. Input Specification: Each inp ...
分类:
其他好文 时间:
2019-09-01 23:30:55
阅读次数:
125
引入 shared_ptr 是c++为了提高安全性而添加的智能指针,方便了内存管理。 特点 shared_ptr 是通过指针保持对象共享所有权的智能指针。多个 shared_ptr 对象可占有同一对象。这便是所谓的引用计数(reference counting)。一旦最后一个这样的指针被销毁,也就是 ...
分类:
其他好文 时间:
2019-09-01 16:51:16
阅读次数:
88