Two integers are called "friend numbers" if they share the same sum of their digits, and the sum is their "friend ID". For example, 123 and 51 are fri ...
分类:
其他好文 时间:
2018-06-09 20:30:32
阅读次数:
159
Problem description There is a game called "I Wanna Be the Guy", consisting of n levels. Little X and his friend Little Y are addicted to the game. Ea ...
分类:
其他好文 时间:
2018-06-09 13:57:17
阅读次数:
196
Problem X: 删除数组元素 Description 定义Array类,其中只有一个int类型的数组,数组元素个数未知。 重载其<<、>>、-运算符。其中"<<"输出所有的数组元素,两两之间用1个空格隔开;">>"根据输入的格式读取数组元素;"-"接收一个int类型的参数a,将数组中与a相等的 ...
分类:
编程语言 时间:
2018-06-08 10:35:33
阅读次数:
236
Problem description A soldier wants to buy w bananas in the shop. He has to pay k dollars for the first banana, 2k dollars for the second one and so o ...
分类:
其他好文 时间:
2018-06-03 14:27:15
阅读次数:
129
友元函数 默认一个类的私有属性只能在该类的内部可以直接访问。 c++ class A1 { public: A1() { a1 = 100; a2 = 200; } int getA1() { return this a1; } //声明一个友元函数 friend void setA1(A1 p, ...
分类:
编程语言 时间:
2018-06-01 13:37:00
阅读次数:
222
目前在总结现代C++的新特性,看了《深入理解C++11》这本书。 今天看到扩展的friend语法这一节,遇到了问题。本节电子版内容参见:https://book.2cto.com/201306/25354.html 未改良前的代码如代码清单2 21所示(在Linux下按照下面的编译指令能够通过),接 ...
分类:
编程语言 时间:
2018-06-01 13:33:16
阅读次数:
220
Hadoop 桥接群的搭建 集群分配:(一主三从) 我电脑的虚拟机:hadoop4:namenode+datanode+resourceManager 我one-friend的电脑虚拟机:hml-1:datanode+datamanager 我two-friend的电脑虚拟机:hadoop_yu1: ...
分类:
其他好文 时间:
2018-06-01 10:43:17
阅读次数:
167
redis-trib.rb是redis官方推出的管理redis集群的工具,集成在redis的源码src目录下,是基于redis提供的集群命令封装成简单、便捷、实用的操作工具。redis-trib.rb是redis作者用ruby完成的。为了看懂redis-trib.rb,我特意花了一个星期学习了rub ...
分类:
其他好文 时间:
2018-05-30 01:22:30
阅读次数:
190
题目描述 AtCoDeer the deer and his friend TopCoDeer is playing a game. The game consists of N turns. In each turn, each player plays one of the two gestur ...
分类:
其他好文 时间:
2018-05-29 00:18:38
阅读次数:
195
Description Bessie has moved to a small farm and sometimes enjoys returning to visit one of her best friends. She does not want to get to her old home ...
分类:
数据库 时间:
2018-05-27 00:23:24
阅读次数:
185