码迷,mamicode.com
首页 >  
搜索关键字:val    ( 23217个结果
LeetCode -- Linked List Cycle
题目链接题意: 给出单链表, 判断是否存在环.方法就是大步小步...附上代码: 1 /** 2 * Definition for singly-linked list. 3 * struct ListNode { 4 * int val; 5 * ListNode *next...
分类:其他好文   时间:2014-05-20 01:46:54    阅读次数:308
sgu 104 Little Shop of Flowers
经典dp问题,花店橱窗布置,不再多说,上代码#include #include #include #include #include #define N 150#define inf 0x7f7f7f7fusing namespace std;int n, m;int val[N][N], f[.....
分类:其他好文   时间:2014-05-19 22:26:02    阅读次数:349
POJ 2828 Buy Tickets(神题!线段树or树状数组)
题目链接:POJ 2828 Buy Tickets【题意】给了你 n(1 7 #include 8 #include 9 using namespace std;10 const int MAX = 200005;11 12 int pos[MAX], val[MAX], ans[MAX];13.....
分类:其他好文   时间:2014-05-19 10:10:34    阅读次数:282
HDU 2795 Billboard(线段树)
题目链接:HDU 2795 Billboard【题意】给你一张h*w(1 7 #include 8 #include 9 using namespace std;10 const int MAX = 200005;11 12 int tree[MAX= val)26 {27 ...
分类:其他好文   时间:2014-05-19 10:09:17    阅读次数:419
js去除左右空格
function yanzheng(val) { return val.replace(/(^\s*)|(\s*$)/g, ""); }function Inputchecking() { var account = document.getElementById("txt_ACCOUNT");.....
分类:Web程序   时间:2014-05-19 09:23:56    阅读次数:237
只能输入数字和空格
obj.value = obj.value.replace(/[^\d\s]/ig,"");//只能输入数字和空格obj.value = obj.value.replace(/[^\d\s\/]/ig,"");//只能输入数字 空格和/obj.value = obj.value.replace(/[...
分类:其他好文   时间:2014-05-19 09:21:19    阅读次数:314
window.location.href = basePath + "paper/deleteExpertComment.action?expertId="+$(this).prev().val();
window.location.href = basePath + "paper/deleteExpertComment.action?expertId="+$(this).prev().val();
分类:Windows程序   时间:2014-05-16 04:14:33    阅读次数:428
hdu 2602 Bone Collector
题目;     点击打开链接 代码; #include #include #include using namespace std; struct beibao{ int val; int vol; }bag[1010]; int main() { int dp[1010]; int i,j,n,v; int t; cin>>t; wh...
分类:其他好文   时间:2014-05-15 22:50:51    阅读次数:394
单链表的排序 快速排序 归并排序 quicksort mergesort
原理都很简单,关键是某些边界能否正确写对: #include #include using namespace std; class Node { public: int val; Node* next; Node(int val = 0):val(val),next(NULL){ } }; Node* quicksort(Node* head, Node* tai...
分类:其他好文   时间:2014-05-15 20:27:36    阅读次数:296
Jquery 对select的操作
jquery对select下拉框的操作总结。。。1、通过索引值去设置select中的option的value和textvarindex=1;varval="该改为的值";$("#selectIdoption:eq("+index+")").attr("selected",true);$("#selectIdoption:selected").val(val);$("#selectIdoption:selected").text(val);
分类:Web程序   时间:2014-05-15 19:00:51    阅读次数:314
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!