MainActivity如下:
package cc.ac;
import android.os.Bundle;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.Button;
import android.widget.LinearLayout;
import ...
分类:
移动开发 时间:
2014-08-09 23:17:39
阅读次数:
437
字符串搜索 可以暴力搜 主要是代码要精简点 参考了网上的代码优化后写出来的ac代码 1 #include 2 #include 3 #include 4 using namespace std; 5 int m,n; 6 int positionx; 7 int positiony; 8 char ...
分类:
其他好文 时间:
2014-08-09 23:12:59
阅读次数:
330
Description
Problem B.Last Digit
Background
Give you a integer number N (1100). Pleasecompute
S=11+22+33+…+NN
Give the last digit of S to me.
Input
...
分类:
其他好文 时间:
2014-08-09 21:30:19
阅读次数:
211
擦 这题 绝逼 坑人 + 一波N折。。。。 touch me我一开始 用了最简单 最sb的 一维hash数组 来做 我看时间2000ms最大数才10W 还以为能过的 ...果断tle了然后 就觉得应该用更高效的数据结构来做了我去问下了下porker 他一开始和我提了下 splay 不会啊=-=...
分类:
其他好文 时间:
2014-08-09 21:19:49
阅读次数:
301
1、效果图(思路:将数据库表按照一定的格式排序,然后序列化成json字符串,绑定到Ztree上并显示出来)zTree v3.5.16 API 文档 :http://www.ztree.me/v3/api.php2、添加应用及显示的位置,设置树需要绑定的字段,与数据库里面的表字段有关(备注:设置树为展...
分类:
数据库 时间:
2014-08-09 21:01:59
阅读次数:
445
题意:很清楚不解释。
策略:如题, 就是个简单的母函数的改变.
这道题做了好久,才明白是那有毛病,还是理解的不够深刻。
AC代码:
#include
#include
int c1[155], c2[155];
int pri[150] = {3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37, 41, 43, 47, 53, 59, 61, 67, 71, 7...
分类:
其他好文 时间:
2014-08-09 18:50:48
阅读次数:
177
?Problem A SPOJ SUB_PROB AC自动机?题意: 给定一个长为M(M≤100000 )的文本串,和N(N≤1000)个长度不超过2000的模式串,问每个模式串是否在文本串中出现过??几乎和周一课件上的第一个例题一模一样。。?把文本串丢到AC自动机里面去跑。?注意:?1.可能有两个...
分类:
其他好文 时间:
2014-08-09 13:11:07
阅读次数:
381
做了这道题目,我才发现一道题即便可行,但是正确性也不一定。多数由于题目数据太弱。
poj 1014 Dividing
题目大意:有6堆石头,权重分别为1 2 3 4 5 6,要求输入 每堆个数 ,求是否可以平分石头使得两堆价值相同。
网上对这道题的做法就两种,其中有错误的版本,却也可以AC。起初这让我等菜鸟感慨代码的简洁,但无法得出正确性的证明
接下来就对两种方法的错误性进行证明。...
分类:
其他好文 时间:
2014-08-09 11:48:47
阅读次数:
245
AC代码:import java.util.Scanner;public class Main { /** * 利用递推得到第n个斐波拉契数 * @param n * @return */ private static int getFibonacciN(...
分类:
其他好文 时间:
2014-08-09 11:31:17
阅读次数:
228
Here I share with you a demo for python map, reduce and filter functional programming that
owned by me(Xiaoqiang).
I assume there are two DB tables, that `file_logs` and `expanded_attrs` which re...
分类:
编程语言 时间:
2014-08-09 04:57:17
阅读次数:
525