去年选拔省赛时候的题目,给了两个素数,问每次修改一位上的数字,修改几次能达到目标数字。最近老是没有
刷题的欲望。浑浑噩噩,这道简单的题目差点就放弃了,确实是搜索中比较简单的题目。每次只改变其中的一位,队
列维护,记录一下距离就可以了。。。下午还有比赛,尽量做吧,无所谓啦。
代码:
#include
#include
#include
#include
#include
#include
#...
分类:
其他好文 时间:
2015-08-27 15:13:58
阅读次数:
106
几个重点强调一下:
(1)注意使用assert;
(2)strcat 和 strcpy最后注意赋值'\0';
(3)strcpy注意内存覆盖的情况;
(4)strcmp中:while(!(ret = *(unsigned char *)s1 - *(unsigned char *)s2) && *s2 != '\0');???为什么要转换类 型;
(5)...
分类:
其他好文 时间:
2015-08-27 15:15:57
阅读次数:
144
今天在学习iOS中遇到了这个错误
“Unknown class xxclass in Interface Builder file” error at runtime
是我在使用xib的时候发生的,并且是我从另一个项目中复制过来的
搜索后才发现,我xib中的label的类属于我复制项目中的名字,而我复制过来之后是把名字改过的。...
分类:
其他好文 时间:
2015-08-27 15:13:11
阅读次数:
119
之前下载过一个PDF,书名是《用python进行自然语言处理》,挺有意思的,加上NLP和机器学习目前大热,想趁着暑假涉猎一下。于是开始了入门NLP之旅。安装环境:Ubuntu14.04桌面版,python版本:2.7第一步:安装nltk,首先要安装pip工具:sudo apt-get install...
分类:
其他好文 时间:
2015-08-27 15:11:35
阅读次数:
136
很多人都会纠结这么一个问题try-catch-finally中有return的情况,我自己总结如下:如果是值类型的话请看代码 1 using System; 2 using System.Collections.Generic; 3 using System.Linq; 4 using System...
分类:
其他好文 时间:
2015-08-27 15:11:37
阅读次数:
114
Open the software, Microtronic AutoHex II. Select “BMW Version” Select “Coding/Programming”. Select “Key Learning” and click on “3” to program a new.....
分类:
其他好文 时间:
2015-08-27 15:11:52
阅读次数:
184
在对话框窗体构造函数加入SystemDialog::SystemDialog(QWidget *parent) : QDialog(parent), ui(new Ui::SystemDialog){ ui->setupUi(this); Qt::WindowFlags fl...
分类:
其他好文 时间:
2015-08-27 15:10:42
阅读次数:
243
今天遇到一个奇怪的问题。同事访问我电脑发布的程序页面,freemarker日期格式报错。而其他电脑访问则没有问题。先贴出错误信息。FreeMarker template errorThe string doesn't match the expected date/time/date-time fo...
分类:
其他好文 时间:
2015-08-27 15:10:23
阅读次数:
600
One of the basic needs of the embedded software development through the terminal to output debugging information, generally two ways to achieve:one is...
分类:
其他好文 时间:
2015-08-27 15:11:35
阅读次数:
313
错误 1 error LNK2019: 无法解析的外部符号 _WinMain@16,该符号在函数 ___tmainCRTStartup 中被引用 MSVC另外新建一个控制台程序可以解决;其实修改一个配置即可:
分类:
其他好文 时间:
2015-08-27 15:09:06
阅读次数:
136
//加载xml及反序列化 XmlDocument xdc = new XmlDocument(); xdc.Load(url); XmlSerializer ser = new XmlSerializer(typeof(InModel...
分类:
其他好文 时间:
2015-08-27 15:10:42
阅读次数:
167
看E问文章时,发现了Dynamics,uikit动力,找了不错的入门文章。 From:http://blog.csdn.net/baecheung/article/details/11911061本文涉及到的WWDC2013 Session有Session 206 Getting Started w...
分类:
其他好文 时间:
2015-08-27 15:07:57
阅读次数:
168
时间复杂度O(m*n)#include #include #include #include #include #include #include #include #define INF 0x3f3f3f3f#define maxn 10000+10#define cle(a) memset(a,...
分类:
其他好文 时间:
2015-08-27 15:07:20
阅读次数:
168
#1、基本环境 环境 版本 jdk 1.7.0_10 ide eclipse-jee-luna-SR2-win32-x86_64 maven 3.3.3 mybatis 3.2.7 mysql 5.1.55 #2、所需jar包 maven的pom.xml 隐藏行号 复制代码 ? pom.xml 4....
分类:
其他好文 时间:
2015-08-27 15:09:47
阅读次数:
132
1.要自定义一个Operation 首先要创建一个继承于NSOperation的类。2.在创建好的类的.h文件声明自定义的方法:-(instancetype)initWithDownLoadMessage:(NSString *)url;3.在创建好的类的.m文件实现自定义方法:-(instance...
分类:
其他好文 时间:
2015-08-27 15:08:30
阅读次数:
108
UITableView的简单认识UITableView最核心的思想就是UITableViewCell的重用机制。简单的理解就是:UITableView只会创建一屏幕(或一屏幕多一点)的UITableViewCell,其他都是从中取出来重用的。每当Cell滑出屏幕时,就会放入到一个集合(或数组)中(这...
分类:
其他好文 时间:
2015-08-27 15:06:53
阅读次数:
145
今天用到的自定义dialog有两种方式。方式一:添加一个xml文件,里面添加dialog的样式,然后: Window window = dialog.getWindow() ; window.setContentView(R.layout.login_wait_dialog); //自定义一个x.....
分类:
其他好文 时间:
2015-08-27 15:07:05
阅读次数:
183