Given amxnmatrix, if an element is 0, set its 
entire row and column to 0. Do it in place.click to show follow up.Follow up:Did 
you use extra space?A s...
                            
                            
                                分类:
其他好文   时间:
2014-05-12 08:22:51   
                                阅读次数:
255
                             
                    
                        
                            
                            
                                http://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&page=show_problem&category=&problem=2459
明天省赛,所以今天做几道所谓水题,可惜这个题因为输出写错WA了很久,,,
如果直接枚举矩阵所有的位置是否改变,那么时间复杂度是承受不住的
这道题让我学到的,就是:
...
                            
                            
                                分类:
其他好文   时间:
2014-05-12 07:10:08   
                                阅读次数:
374
                             
                    
                        
                            
                            
                                public class MainActivity extends 
ActionBarActivity { private static ActivityManager am; private static List 
appList; private static List ta...
                            
                            
                                分类:
其他好文   时间:
2014-05-10 07:49:35   
                                阅读次数:
256
                             
                    
                        
                            
                            
                                1. 定义js类 js并不是一种面向对向的语言, 没有提供对类的支持, 
因此我们不能像在传统的语言里那样 用class来定义类, 但我们可以利用js的闭包封装机制来实现js类, 我们来封装一个简的Shape类. 代码如下: 
function ShapeBase() { this.show = fun...
                            
                            
                                分类:
Web程序   时间:
2014-05-10 06:11:24   
                                阅读次数:
282
                             
                    
                        
                            
                            
                                1 class SuperClass{ 2 3 public SuperClass() { 4 
System.out.println("superclass "); 5 show(); 6 } 7 public void show() { 8 
System.out...
                            
                            
                                分类:
编程语言   时间:
2014-05-10 05:47:03   
                                阅读次数:
299
                             
                    
                        
                            
                            
                                如图:
点击单选按钮"开灯",多选按钮就会显示"关灯"且方块里有对勾;反之,点多选按钮,单选按钮也自动改变。
首先,先创建一个安卓项目(我的版本是4.4.2的),名字为"bulb",把两张图片:开灯与关灯状态的图片放入"drawable-"随意一个文件夹下
然后在res文件夹下找到layout文件夹,找到activity_main.xml或fragment_main.xml,在里面输...
                            
                            
                                分类:
移动开发   时间:
2014-05-10 04:26:27   
                                阅读次数:
466
                             
                    
                        
                            
                            
                                public void replaceRightView(View v) {
		int f = LinearLayout.LayoutParams.MATCH_PARENT;
		LinearLayout.LayoutParams params = new LinearLayout.LayoutParams(f, f);
		LinearLayout fragment_place = (Line...
                            
                            
                                分类:
其他好文   时间:
2014-05-09 22:50:20   
                                阅读次数:
332
                             
                    
                        
                            
                            
                                链接:http://soj.me/show_problem.php?pid=1735&cid=
Description
Let me introduce an easy method of encryption to you.
Suppose there’re N bytes (1 byte = 8 bits) data that are to be encrypted and ...
                            
                            
                                分类:
其他好文   时间:
2014-05-09 22:46:01   
                                阅读次数:
498
                             
                    
                        
                            
                            
                                如图,点击按钮就会切换屏幕的颜色
首先,先创建一个安卓项目(我的版本是4.4.2的),名字为"world",当然,也可以别的名称
然后在res文件夹下找到layout文件夹,找到activity_main.xml或fragment_main.xml,在里面输入或拖拽按钮
<RelativeLayout xmlns:android="http://schemas.android.com/apk...
                            
                            
                                分类:
移动开发   时间:
2014-05-09 22:30:47   
                                阅读次数:
441
                             
                    
                        
                            
                            
                                use databases 显示所有数据库 use schame 使用数据库 show tables 
显示当前数据库中的所有表 describe table 显示表结果 其他一些基本操作:例如更新,插入,查询,删除。 
参考资料:http://wenku.baidu.com/link...
                            
                            
                                分类:
数据库   时间:
2014-05-09 19:20:41   
                                阅读次数:
363