码迷,mamicode.com
首页 > 其他好文
LeetCode: Reverse Words in a String
LeetCode: Reverse Words in a StringGiven an input string, reverse the string word by word. For example,Given s = "the sky is blue",return "blue is sky...
分类:其他好文   时间:2014-07-27 23:33:19    阅读次数:173
LeetCode: Reverse Words in a String:Evaluate Reverse Polish Notation
LeetCode: Reverse Words in a String:Evaluate Reverse Polish NotationEvaluate the value of an arithmetic expression in Reverse Polish Notation.Valid op...
分类:其他好文   时间:2014-07-27 23:32:59    阅读次数:262
Primes on Interval
AC代码:#include#include#include#includeusingnamespacestd;constintmaxn=1001000;#defineinf(1ans)ans=tmp;tmp=p[s+k-1]-a+1;if(tmp>ans)ans=tmp;for(inti=s;i+k...
分类:其他好文   时间:2014-07-27 23:32:49    阅读次数:227
WPF绑定的ListBox获取ListBoxItem及GoToState应用
现公司项目中需要制作一个扇形菜单,菜单项是用ListBox重写Style实现的,其数据是绑定的。菜单的每一项都有Normal,MouseOver和Selected三种状态,这三种状态当然可以通过鼠标移动和点击控制,但现在要通过代码来改变控件外观实现三种状态切换,该如何处理呢?1.WPF绑定的List...
分类:其他好文   时间:2014-07-27 23:32:39    阅读次数:422
POJ 之2386 Lake Counting
Lake CountingTime Limit: 1000MSMemory Limit: 65536KTotal Submissions: 20003Accepted: 10063DescriptionDue to recent rains, water has pooled in various ...
分类:其他好文   时间:2014-07-27 23:32:29    阅读次数:256
使用blas做矩阵乘法
typedef enum CBLAS_ORDER {CblasRowMajor=101, CblasColMajor=102} CBLAS_ORDER;typedef enum CBLAS_TRANSPOSE {CblasNoTrans=111, CblasTrans=112, CblasC...
分类:其他好文   时间:2014-07-27 23:32:19    阅读次数:425
C中的Float分析
C/C++中, 浮点数,float以及 double 在内存中是怎样存储的?假如,我有32-bit 8bit 8bit 8bit 0 0 0 0 0 1 1 1 1 对于整形int,我们可以很快得出,这是 int...
分类:其他好文   时间:2014-07-27 23:31:49    阅读次数:382
UVA 10608
并查集简单题#include #include using namespace std;#define max 30010int f[max];int getf(int k){ while(k!=f[k]){ k=f[k]; } return k;}void combine(int a,int b)...
分类:其他好文   时间:2014-07-27 23:31:09    阅读次数:193
【J2EE】Struts2+Tomcat开发环境部署,“Hello World”的实现
1、下载Struts2的开发包
分类:其他好文   时间:2014-07-27 23:30:29    阅读次数:429
HIL硬件在环仿真
2012年刚参加工作,那一年主要的工作就是硬件在环仿真。刚开始接触硬件在环的时候很头疼,当时这里已经有了一台HIL,用来模拟测试HEV,虽然供应商支持还算不错,但是支持总是有限度的。硬着头皮啃了几个月E文和供应商给的文档,一步步开始做,才算慢慢入门,到项目完成时,对HIL也就很熟悉了。工作也挺长时间...
分类:其他好文   时间:2014-07-27 23:30:09    阅读次数:291
Matlab画图,坐标轴范围设置和间隔设置
在Matlab画图的时候,系统默认的坐标轴范围以及间隔有时候并不是很合适,如何根据自己的要求来显示呢,Set语句就可以帮忙咯!! 1. set(gca,'xtick',0:100:2500) 功能: 设置X轴坐标范围0到2500,显示间隔是100; 2.set(gca,'ytick',0:100:2...
分类:其他好文   时间:2014-07-27 23:29:59    阅读次数:988
烦躁夏日需整顿
浑浑噩噩,实习快一个月了,没有感觉时间的无情划过每个生活的细节,甚至没有好好感受过生活。就这样没有了。曾经理想的不凡,与众不同不过是在社会的一种中庸氛围下,磨合的没有形状,没有张扬的勇气和魄力。anyway,我想要诉说的是每天带进一些正能量和改变,从思维和性格。每天需要总结,现在不是懈怠的时候,找工...
分类:其他好文   时间:2014-07-27 23:28:39    阅读次数:261
LeetCode Unique Binary Search Trees II
class Solution {private: vector res;public: vector generateTrees(int n) { res.clear(); res = dfs(1, n + 1); return res; ...
分类:其他好文   时间:2014-07-27 23:28:19    阅读次数:195
UESTC 4 Complete Building the Houses 树状数组
题目来源:http://acm.uestc.edu.cn/#/problem/show/4分析:就是一个很普通的区间修改,单点查询的树状数组,但是今天忘记吃药了,一直写不对,中午迷迷糊糊地,直接把数据读入到数组里而不是update,然后又总是考虑后面的数被减到0以下要怎么处理,其实根本不用考虑,直接...
分类:其他好文   时间:2014-07-27 23:27:59    阅读次数:251
自定义泛型类,本质就是利用微软提供的集合和集合接口
//实现IEnumerable接口中的GetEnumerator()方法,为了能支持foreach遍历 class MyClass:IEnumerable { List list = new List(); private List items; public List Items { get { ...
分类:其他好文   时间:2014-07-27 23:27:49    阅读次数:308
CodeForces 237C
素数打表,加上sum[i]数组表示1-i中有多少个素数二分查找#include #include using namespace std;#define max 1000005int phi[max],sum[max];int a,b,k;void getp(){ for(int i=2;i>a>>...
分类:其他好文   时间:2014-07-27 23:27:19    阅读次数:355
FZU 1901
#include #include 考查了对next数组的了解using namespace std;#define max 1000005int next[max],l,ans[max];char s[max];void getNext(){ int j,k; next[0]=-1; j=0;k=...
分类:其他好文   时间:2014-07-27 23:26:49    阅读次数:174
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!