现在位置: 首页 > envegoidiom发表的所有文章
  • 08月
  • 18日
综合 ⁄ 共 1210字 评论关闭
题目链接:LightOJ 1269 - Consecutive Sum 题目大意:给定一个序列,选定一段区间的亦或和,输出最大和最小。 解题思路:最大很简单,对所有前缀建立字典树,然后尽量往反向走;最小则需要往正向走,并且向正向走的时候要扣 除自己本身。 #include <cstdio> #include <cstring> #include <algorithm> using namespace std; const int maxn = 50005 * 32; const int sigma_size = 2; struct Tire { int sz; int g[maxn][sigma_size]; int c[maxn]; void init(); void insert(int s)......
阅读全文
  • 04月
  • 20日
综合 ⁄ 共 1561字 评论关闭
vim的配置和使用教程: http://scmbob.org/category/cat_linux http://www.vimer.cn/2009/10/%E6%8A%8Avim%E6%89%93%E9%80%A0%E6%88%90%E4%B8%80%E4%B8%AA%E7%9C%9F%E6%AD%A3%E7%9A%84ide2.html http://blog.csdn.net/wang_shuai_ww/article/details/10455723 http://dinever.com/blog/2013/04/19/ru-he-zai-yi-ye-zhi-jian-tu-ran-xue-hui-VIM/ http://beiyuu.com/git-vim-tutorial/ http://coolshell.cn/articles/8883.html 简明 Vim 练级攻略 http://coolshell.cn/articles/5426.html 获得uboot最新版本:http://ftp.denx.......
阅读全文
  • 04月
  • 01日
编程语言 ⁄ 共 563字 评论关闭
一直对动态语言的的method obj和function obj感到困惑: 今天看了一个较好的区分介绍: A function is a piece of code that is called by name. It can be passed data to operate on (ie. the parameters) and can optionally return data (the return value). All data that is passed to a function is explicitly passed. A method is a piece of code that is called by name that is associated with an object. In most respects it is identical to a function except for two key differences. It is implicitly pa......
阅读全文
  • 10月
  • 07日
综合 ⁄ 共 745字 评论关闭
map,multimap: map中不允许有重复元素。 自动按key键升序排序。 #include <iostream> #include <map> using namespace std; int main() { //map<int, int> m; multimap<int, int> m; m.insert(pair<int, int>(1, 10)); m.insert(pair<int, int>(3, 30)); m.insert(pair<int, int>(5, 50)); m.insert(pair<int, int>(4, 40)); m.insert(pair<int, int>(2, 20)); m.insert(pair<int, int>(5, 50)); map<int, int>::iterator ite = m.begin(); fo......
阅读全文
工程中大量出现该问题 原因:java 1.5 不支持 override 解决方式:右键工程名-----properties------Java Compile    选择为1.6即可
阅读全文
  • 05月
  • 28日
综合 ⁄ 共 47字 评论关闭
时间 :2014年8月11日 地点:寝室 心情:就那样,最近在看C++,嵌入式一直搞不懂,有点头疼~
阅读全文
  • 05月
  • 10日
综合 ⁄ 共 297字 评论关闭
1. 找到hosts 文件。 windows 7的路径为: %SystemRoot%\system32\drivers\etc\ 2. 用notepad++ 打开,并在最下面添加这样几行: 74.125.204.136 dl-ssl.google.com 203.208.46.146 dl-ssl.google.com 74.125.237.1 dl-ssl.google.com 203.208.46.146 dl.google.com  3. 打开sdk manager, go to "Tools->options", 选中“force https://... source to be fetched” 4. 重启sdk manager 5. OK
阅读全文
  • 04月
  • 23日
综合 ⁄ 共 1730字 评论关闭
感谢宇哥提供的思路,manacher算法,确实很强大,充分利用了回文串的性质 code /* ID: yueqiq PROG: calfflac LANG: C++ */ #include <set> #include <map> #include <ctime> #include <queue> #include <cmath> #include <stack> #include <limits> #include <vector> #include <bitset> #include <string> #include <cstdio> #include <cstring> #include <fstream> #include <string.h> #include <iostream> #include <algorit......
阅读全文
  • 02月
  • 20日
综合 ⁄ 共 279字 评论关闭
1. 确保针对Mac虚拟机的VMware Tools的安装 加载进入系统后,在mac里可看到安装和卸载vmware tools的两个图标(点开vmware tools磁盘),点安装的就可以了。 2. 共享文件夹 右键你的虚拟系统settings    或者   VM->Settings  又或者 ctrl+D,如图点击options选项,选中shared folders,然后选中always enabled。 添加你需要共享的文件夹就行了,也可以添加一个盘符,如下图,不要的也可以remove掉。 打开虚拟Mac X OS. 桌面会有这样一个快捷方式文件夹,你打开就可以看到你的共享文件夹了。
阅读全文
  • 02月
  • 18日
综合 ⁄ 共 2006字 评论关闭
题目描述 Description 小明过生日的时候,爸爸送给他一副乌龟棋当作礼物。 乌龟棋的棋盘是一行N个格子,每个格子上一个分数(非负整数)。棋盘第1格是唯一 的起点,第N格是终点,游戏要求玩家控制一个乌龟棋子从起点出发走到终点。 …… 1 2 3 4 5 ……N 乌龟棋中M张爬行卡片,分成4种不同的类型(M张卡片中不一定包含所有4种类型 的卡片,见样例),每种类型的卡片上分别标有1、2、3、4四个数字之一,表示使用这种卡 片后,乌龟棋子将向前爬行相应的格子数。游戏中,玩家每次需要从所有的爬行卡片中选择 一张之前没有使用过的爬......
阅读全文
1. 开发应用程序时, 如果要在接受到本地通知或者远程通知里进行事件处理, 则可以直接在didReceiveLocalNotification和didReceivedRemoteNotification方法中直接进行调用。 应用程序启动时的main.m文件, 直接指定appDelegate int main(int argc, char * argv[]) {     @autoreleasepool {         return UIApplicationMain(argc, argv, nil, NSStringFromClass([DemoAppDelegate class]));     } } 2. 如果是捕获的是 applicationWillResignActive,  applicationWillEnterForeground,  applicationDidBecomeActive,  didFin......
阅读全文
  • 02月
  • 06日
综合 ⁄ 共 748字 评论关闭
第一次: #include<stdio.h> float ans=1.0; void maxs(float arg1,float arg2,float arg3){ if(arg1>=arg2&&arg1>=arg3) {printf("W ");ans=ans*arg1;} else if(arg2>=arg1&&arg2>=arg3) {printf("T ");ans=ans*arg2;} else {printf("L ");ans=ans*arg3;} } int main(){ float info[10]; int i,j; for(i=1;i<=9;i++){ scanf("%f",&info[i]); } maxs(info[1],info[2],info[3]); maxs(info[4],info[5],info[6]); maxs(info[7],info[8],info[9]); ......
阅读全文