Monthly Expense Time Limit: 2000MS   Memory Limit: 65536K Total Submissions: 25959   Accepted: 10021 Description Farmer John is an astounding accounting wizard and has realized he might run out of money to run the farm. He has already calculated and…
Building Shops                                                             Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 131072/131072 K (Java/Others)                                                                                          …
1.为什么要使用serialVersionUID (1)对于实现了Serializable接口的类,可以将其序列化输出至磁盘文件中,同时会将其serialVersionUID输出到文件中. (2)然后有需要使用时,再从磁盘将对象内容及serialVersionUID读入内容中的某个对象. (3)将磁盘内容读入对象时,需要进行强制类型转换,如Person person = (Person)ois.readObject(); (4) 此时,将对比从磁盘读入的Serializable与对象所属类(如P…
制作运行库 由于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上运行,也许早在相应的路径下找到运…
全盘格式化,重装了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…
************************************************************ * 标题:MS SQLServer 批量附加数据库 * 说明:请根据下面的注释使用此脚本 * 时间: 2015/7/13 11:16:41 ************************************************************/ USE MASTER GO IF OBJECT_ID('[sp_AttchDataBase]') IS NOT N…
The Happy Worm Time Limit: 5000MS Memory Limit: 131072K Total Submissions: 4698 Accepted: 1047 Description The Happy Worm lives in an m*n rectangular field. There are k stones placed in certain locations of the field. (Each square of the field is eit…
FatMouse' Trade Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others) Total Submission(s): 63198 Accepted Submission(s): 21342 Problem Description FatMouse prepared M pounds of cat food, ready to trade with the cats guardin…
==============NSArray(不可变数组)=========== NSArray,继承自NSObject  用来管理(储存)一些有序的对象,不可变数组. 创建一个空数组 NSArray *array1=[[NSArray alloc]init];               //NSArray *array2=[NSArray array]; nil   数组结束标志 NSArray *array3=[[NSArray alloc]initWithObjects:@"rose&qu…
Easy Summation                                                             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…
Borg Maze Time Limit: 1000MS   Memory Limit: 65536K Total Submissions: 14165   Accepted: 4619 Description The Borg is an immensely powerful race of enhanced humanoids from the delta quadrant of the galaxy. The Borg collective is the term used to desc…
C. Cellular Network time limit per test 3 seconds memory limit per test 256 megabytes input standard input output standard output You are given n points on the straight line - the positions (x-coordinates) of the cities and m points on the same line…
L2-003. 月饼 时间限制 100 ms 内存限制 65536 kB 代码长度限制 8000 B 判题程序 Standard 作者 陈越 月饼是中国人在中秋佳节时吃的一种传统食品,不同地区有许多不同风味的月饼.现给定所有种类月饼的库存量.总售价.以及市场的最大需求量,请你计算可以获得的最大收益是多少. 注意:销售时允许取出一部分库存.样例给出的情形是这样的:假如我们有3种月饼,其库存量分别为18.15.10万吨,总售价分别为75.72.45亿元.如果市场的最大需求量只有20万吨,那么我们最大…
1.Shell$ExitCodeException 现象:运行hadoop job时出现如下异常: 14/07/09 14:42:50 INFO mapreduce.Job: Task Id : attempt_1404886826875_0007_m_000000_1, Status : FAILED Exception from container-launch: org.apache.hadoop.util.Shell$ExitCodeException:  org.apache.hado…
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…
棋盘问题 Time Limit: 1000MS Memory Limit: 10000K Total Submissions: 28474 Accepted: 14084 Description 在一个给定形状的棋盘(形状可能是不规则的)上面摆放棋子,棋子没有区别.要求摆放时任意的两个棋子不能放在棋盘中的同一行或者同一列,请编程求解对于给定形状和大小的棋盘,摆放k个棋子的所有可行的摆放方案C. Input 输入含有多组测试数据. 每组数据的第一行是两个正整数,n k,用一个空格隔开,表示了将在一…
{A} + {B} Time Limit: 10000/5000 MS (Java/Others)    Memory Limit: 65536/32768 K (Java/Others) Total Submission(s): 14601    Accepted Submission(s): 6099 Problem Description 给你两个集合,要求{A} + {B}. 注:同一个集合中不会有两个相同的元素.   Input 每组输入数据分为三行,第一行有两个数字n,m(0<n,m…
Emag eht htiw Em Pleh Time Limit: 1000MS   Memory Limit: 65536K Total Submissions: 2937   Accepted: 1944 Description This problem is a reverse case of the problem 2996. You are given the output of the problem H and your task is to find the correspond…
Tautology Time Limit: 1000MS   Memory Limit: 65536K Total Submissions: 10428   Accepted: 3959 Description WFF 'N PROOF is a logic game played with dice. Each die has six faces representing some subset of the possible symbols K, A, N, C, E, p, q, r, s…
地址:http://acm.nyist.net/JudgeOnline/problem.php?pid=102 //a^b mod c=(a mod c)^b mod c很容易设计出一个基于二分的递归算法. #include<stdio.h> #include<stdlib.h> //快速幂算法,数论二分 long long powermod(int a,int b, int c) //不用longlong就报错,题目中那个取值范围不就在2的31次方内 { long long t;…
阅读大型代码,我们经常需要打开很多的代码文件,搜索各种定义.windows下用惯了ide的朋友,转战Linux的时候可能会觉得很难受,找不到合适的阅读工具.其实万能的vim就可以实现.下面介绍一下vim+ctags+taglist的配置. 安装ctags ubuntu源提供了ctags的安装. sudo apt-get install ctags 安装taglist 下载: http://vim.sourceforge.net/scripts/download_script.php?src_id…
1.write write命令通信是一对一的通信,即两个人之间的通信,如上图. 效果图 用法:write <用户名> 2.wall wall指令可将信息发送给每位同意接收公众信息的终端机用户 效果图 wall是将一个文件的内容发送出去 3.ping 选项 IP地址 这个命令就不用多讲了吧,测试网络是否连通 4.ifconfig 这个命令用来查看IP地址,注意是ifconfig而不是ipconfig 版权声明:本文为博主原创文章,未经博主允许不得转载.…
截取全屏代码: try { this.Hide(); Rectangle bounds = Screen.GetBounds(Screen.GetBounds(Point.Empty)); Bitmap bitmap = new Bitmap(bounds.Width, bounds.Height); Graphics g = Graphics.FromImage(bitmap); g.CopyFromScreen(Point.Empty, Point.Empty, bounds.Size);…
(1)创建一个项目,将其命名为MenuHistory,默认窗体为Form1. (2)从工具箱中向Form1窗体添加MenuStrip控件,同时向窗体添加OpenFileDialog控件.创建一个"文件"主菜单,在其下面创建打开.关闭所有.退出等菜单选项. (3)代码如下: using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System…
在linux下一般用scp这个命令来通过ssh传输文件. 1.从服务器上下载文件 scp username@servername:/path/filename /var/www/local_dir(本地目录) 例如scp root@192.168.0.101:/var/www/test.txt 把192.168.0.101上的/var/www/test.txt 的文件下载到/var/www/local_dir(本地目录) 2.上传本地文件到服务器 scp /path/filename usern…
树莓派使用的linux是debian系统,所以树莓派启用root和debian是相同的. debian里root账户默认没有密码,但账户锁定. 当需要root权限时,由默认账户经由sudo执行,Raspberry pi 系统中的Raspbian 默认用户是pi 密码为raspberry 重新开启root账号,可由pi用户登录后,在命令行下执行 sudo passwd root 执行此命令后系统会提示输入两遍的root密码,输入你想设的密码即可,然后在执行 sudo passwd –unlock…
Python有专门的time模块可以供调用. <span style="font-size:14px;">import time print time.time()</span> 输出如下 但是这样我们都看不出时间是什么意思,下面,我们可以用time模块提供的 time.localtime 来实现时间的格式化: 如图: 但这样还不是我想要的输出,最后用time.strftime()方法,把刚才的一大串信息格式化成我想要的格式:如图: time.strftime里…
PC: apt-get install qtcreator Qt Embedded for ZedBoard: 下载qt-everywhere-opensource-src-4.7.3.tar.gz,这里下载源码和Xilinx公司提供的Zynq的Qt配置文件qmake.conf,感谢别人的分享,这个的版本是4.7.3. 之前我们已经配置好了交叉编译环境使用的环境变量PATH和 CROSS_COMPILE,为了方便操作,还可以在设置如下几个环境变量. export ZYNQ_QT_BUILD=/o…
Opencv的移植,xzyfeixiang和rainysky的博客. 第一步肯定是下载opencv的源码包 第二步已经做好的交叉编译环境. 第三步下载安装cmake   apt-get install cmake cmake-curses-gui 第四步解压源码包   tar -xvjf Opencv-2.3.1.tar.bz2 -C /home/xzy 在/home/xzy下就有 Opencv-2.3.1这个文件夹,进入,新建一个build和一个install文件夹,并且新建一个toolcha…