Specialized Four-Digit Numbers Time Limit: 2 Seconds      Memory Limit: 65536 KB Find and list all four-digit numbers in decimal notation that have the property that the sum of its four digits equals the sum of its digits when represented in hexadeci…
Self Numbers Time Limit: 1000MS   Memory Limit: 10000K Total Submissions: 22101   Accepted: 12429 Description In 1949 the Indian mathematician D.R. Kaprekar discovered a class of numbers called self-numbers. For any positive integer n, define d(n) to…
Bubble Shooter Time Limit : 2000/1000ms (Java/Other)   Memory Limit : 65536/32768K (Java/Other) Total Submission(s) : 3   Accepted Submission(s) : 3 Font: Times New Roman | Verdana | Georgia Font Size: ← → Problem Description Bubble shooter is a popu…
c++map的用法 分类: 资料 2012-11-14 21:26 10573人阅读 评论(0) 收藏 举报 最全的c++map的用法 此文是复制来的0.0 1. map最基本的构造函数: map<string ,int>mapstring; map<int,string >mapint; map<sring,char>mapstring; map< char ,string>mapchar; map<char,int>mapchar; map&…
制作运行库 由于ubuntu的Qt运行库在/usr/local/Trolltech/Qt-4.7.3/下,由makefile可以看到引用运行库是 INCPATH = -I/usr//mkspecs/default -I. -I/usr//include/QtCore -I/usr//include/QtNetwork -I/usr//include/QtGui -I/usr//include -I. -I. -I. 因此如果将编译后的可执行文件在ZedBoard上运行,也许早在相应的路径下找到运…
最近做的项目中,有一个类似微博中的评论转发功能,屏幕底端有一个输入框用textView来做,当textView成为第一响应者的时候它的Y值随着键盘高度的改变而改变,保证textView紧贴着键盘,但又不会被键盘挡住. 下面是我实现的方法:(利用通知) 1 2 3 4 5 6 7 8 9 10 11 12 // 键盘通知     // 键盘的frame发生改变时发出的通知(位置和尺寸)     //    UIKeyboardWillChangeFrameNotification     //  …
B - Minimum Inversion Number Time Limit:1000MS     Memory Limit:32768KB     64bit IO Format:%I64d & %I64u Submit Status Practice HDU 1394 Description The inversion number of a given number sequence a1, a2, ..., an is the number of pairs (ai, aj) that…
Doubles Time Limit: 1000MS   Memory Limit: 10000K Total Submissions: 19954   Accepted: 11536 Description As part of an arithmetic competency program, your students will be given randomly generated lists of from 2 to 15 unique positive integers and as…
Automatic Judge Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 131072/131072 K (Java/Others) Total Submission(s): 16    Accepted Submission(s): 11 Problem Description Welcome to HDU to take part in the second CCPC girls' competition! A new a…
以下代码使用平台是Windows7 64bits+VS2012. sizeof是C/C++中的一个操作符(operator),其作用就是返回一个对象或者类型所占的内存字节数,使用频繁,有必须对齐有个全面的了解. 1.sizeof的基本语法 sizeof有三种语法形式,如下: (1)sizeof( object ); // sizeof( 对象 ); (2) sizeof( type_name ); // sizeof( 类型 ); (3)sizeof object; // sizeof 对象;…
Pots Time Limit: 1000MS Memory Limit: 65536K Total Submissions: 11885 Accepted: 5025 Special Judge Description You are given two pots, having the volume of A and B liters respectively. The following operations can be performed: FILL(i) fill the pot i…
Network Time Limit: 1000MS Memory Limit: 30000K Total Submissions: 14721 Accepted: 5777 Special Judge Description Andrew is working as system administrator and is planning to establish a new network in his company. There will be N hubs in the company…
Gold Coins Time Limit: 1000MS   Memory Limit: 30000K Total Submissions: 21767   Accepted: 13641 Description The king pays his loyal knight in gold coins. On the first day of his service, the knight receives one gold coin. On each of the next two days…
False coin Time Limit: 1000MS   Memory Limit: 65536K Total Submissions: 16418   Accepted: 4583 Description The "Gold Bar"bank received information from reliable sources that in their last group of N coins exactly one coin is false and differs in…
加载bcmdhd模块:# modprobe bcmdhd 如果你希望开启 AP 模式,那么:# modprobe bcmdhd op_mode=2 在/etc/modules文件内添加bcmdhd op_mode=2,以实现bcmdhd模块的开机自动加载. hostapd安装与配置 参考链接:http://wireless.kernel.org/en/users/Documentation/hostapd#Using_your_distributions_hostapd 安装hostapd: 1…
问题1:首先参考rainysky的博客,发现qmake时发生找不到目录,文件的错误,又找不到 qmake.conf 文件的写法.所以开始按照网上的程序修改 XXX.pro 文件. 问题2:使用QT Creator 修改完pro文件之后,再使用QT Embedded ,qmake 之后,pro文件恢复到原来修改之前的样子.应该是,QT Embedded编译会覆盖原来的pro文件,生成自己的配置文件. 思路:两个. 其一,完全使用QT Creator进行编译,参照网上的blog修改编译工具,再次修改…
全盘格式化,重装了Ubuntu和Windows,记录一下重新配置Ubuntu过程. //build-essential sudo apt-get install build-essential sudo apt-get install vim //input method sougou <span style="color:#33FF33;">sudo apt-get remove ibus</span> //去掉 sudo add-apt-repository…
/*M/////////////////////////////////////////////////////////////////////////////////////// // // IMPORTANT: READ BEFORE DOWNLOADING, COPYING, INSTALLING OR USING. // // By downloading, copying, installing or using the software you agree to this licen…
C - Rightmost Digit Time Limit:1000MS Memory Limit:32768KB 64bit IO Format:%I64d & %I64u Submit Status Practice HDU 1061 Description Given a positive integer N, you should output the most right digit of N^N. Input The input contains several test case…
Sum of Consecutive Prime Numbers Time Limit: 1000MS   Memory Limit: 65536K Total Submissions: 25225   Accepted: 13757 Description Some positive integers can be represented by a sum of one or more consecutive prime numbers. How many such representatio…
K Best Time Limit: 8000MS   Memory Limit: 65536K Total Submissions: 10261   Accepted: 2644 Case Time Limit: 2000MS   Special Judge Description Demy has n jewels. Each of her jewels has some value vi and weight wi. Since her husband John got broke aft…
==============NSArray(不可变数组)=========== NSArray,继承自NSObject  用来管理(储存)一些有序的对象,不可变数组. 创建一个空数组 NSArray *array1=[[NSArray alloc]init];               //NSArray *array2=[NSArray array]; nil   数组结束标志 NSArray *array3=[[NSArray alloc]initWithObjects:@"rose&qu…
Graph Theory                                                                 Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 131072/131072 K (Java/Others)                                                                                        …
Coprime Sequence                                                        Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 131072/131072 K (Java/Others)                                                                                      Total S…
Building Shops                                                             Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 131072/131072 K (Java/Others)                                                                                          …
Beat the Spread! Time Limit: 2 Seconds      Memory Limit: 65536 KB Superbowl Sunday is nearly here. In order to pass the time waiting for the half-time commercials and wardrobe malfunctions, the local hackers have organized a betting pool on the game…
The battle near the swamp Gungan: Jar Jar, usen da booma!  Jar Jar: What? Mesa no have a booma!  Gungan: Here. Taken dis one. In the battle with the Trade Federation, Queen Amidala decided to ask gungans for help. Jar Jar Binks escorted the Queen and…
L2-009. 抢红包 时间限制 300 ms 内存限制 65536 kB 代码长度限制 8000 B 判题程序 Standard 作者 陈越 没有人没抢过红包吧-- 这里给出N个人之间互相发红包.抢红包的记录,请你统计一下他们抢红包的收获. 输入格式: 输入第一行给出一个正整数N(<= 104),即参与发红包和抢红包的总人数,则这些人从1到N编号.随后N行,第i行给出编号为i的人发红包的记录,格式如下: K N1 P1 ... NK PK 其中K(0 <= K <= 20)是发出去的红…
L2-003. 月饼 时间限制 100 ms 内存限制 65536 kB 代码长度限制 8000 B 判题程序 Standard 作者 陈越 月饼是中国人在中秋佳节时吃的一种传统食品,不同地区有许多不同风味的月饼.现给定所有种类月饼的库存量.总售价.以及市场的最大需求量,请你计算可以获得的最大收益是多少. 注意:销售时允许取出一部分库存.样例给出的情形是这样的:假如我们有3种月饼,其库存量分别为18.15.10万吨,总售价分别为75.72.45亿元.如果市场的最大需求量只有20万吨,那么我们最大…
人的视觉系统具有颜色恒常性,能从变化的光照环境和成像条件下获取物体表面颜色的不变特性,但成像设备不具有这样的调节功能, 不同的光照环境会导致采集的图像颜色与真实颜色存在一定程度的偏差,需要选择合适的颜色平衡(校正)算法,消除光照环境对颜 色显现的影响.灰度世界算法是最常用平衡算法. 一.灰度世界算法 灰度世界算法以灰度世界假设为基础,该假设认为:对于一幅有着大量色彩变化的图像,,三个分量的平均值趋于同一灰 度值.从物理意义上讲,灰色世界法假设自然界景物对于光线的平均反射的均值在总体上是个定值,这…