码迷,mamicode.com
首页 >  
搜索关键字:int    ( 143001个结果
数据库的知识忘干净了
第一题 DROP TABLE TB DROP TABLE TA create table TA ( IDKey int primary key, [Name] varchar(20), [Type] varchar(20) ) create table TB ( DKey int primary k ...
分类:数据库   时间:2016-09-14 23:23:28    阅读次数:245
HDU_1455_dfs
http://acm.hdu.edu.cn/showproblem.php?pid=1455 int dfs(int all,int sum,int now),all代表剩余总长,sum,代表每段长,now代表当前拼接的长度。 if(a[i]+now == sum || now == 0) retu ...
分类:其他好文   时间:2016-09-14 23:20:06    阅读次数:154
C++产生随机数
#include<iostream> #include<ctime> #include<cstdlib> using namespace std; double random(double,double); int main() { srand( unsigned( time(0) ) );//sr ...
分类:编程语言   时间:2016-09-14 23:12:43    阅读次数:206
try--catch--finally中return返回值执行的顺序(区别)
1、try块中没有抛出异常,try、catch和finally块中都有return语句 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 public static int NoException(){ int i=10; try{ System.out.println( ...
分类:其他好文   时间:2016-09-14 21:57:10    阅读次数:162
STL基础
vector: 1.头文件#include<vector> 2.声明vector对象,vector<int> vec; 3.尾部插入a:vec.push_back(a); 4.使用下标访问元素,cout<<vec[0]<<endl; 5.使用迭代器访问元素: for( vector<int>::it ...
分类:其他好文   时间:2016-09-14 21:45:12    阅读次数:160
算法5--排序--Merge Sorted Array
之前几天在忙其他的事情,没有时间更新,今天更新了几个,虽然有几个SMR的博客暂时没有开放,已经写好了,以后会慢慢开放的 今天再更新一个有关排序的算法题 1 Merge Sorted Array描述Given two sorted integer arrays A and B, merge B int ...
分类:编程语言   时间:2016-09-14 20:39:17    阅读次数:135
HDU5869树状数组+gcd预处理
比赛的时候知道用树状数组,但有点乱不知道怎么处理。 统计不同的gcd的个数其实就是用树状数组统计区间内不同的数的模板题啊... 复杂度O(nlogn) 1 #include <bits/stdc++.h> 2 using namespace std; 3 const int N = 1e5+10; ...
分类:编程语言   时间:2016-09-14 20:37:31    阅读次数:248
冒泡,二分制,模拟摇奖
1. 实现冒泡排序算法。 //冒泡排序 int [] a={1,7,9,3,6,0,2}; int z; for(int i=0;i<a.length;i++) { for(int j=i;j<a.length;j++) { if(a[i]>a[j]) { z=a[i]; a[i]=a[j]; a[ ...
分类:其他好文   时间:2016-09-14 20:25:41    阅读次数:110
Kotlin编程语言
入门指南 基本语法 定义包 包的声明必须在源文件的顶部: package my.demo import java.util.* java 不同包不必和目录结构匹配: 源文件可以放到文件系统的任意位置。 函数定义 如下是一个有两个Int类型的参数和Int返回值的例子: fun sum(a: Int, ...
分类:编程语言   时间:2016-09-14 19:08:09    阅读次数:178
静态 非静态代码块和构造器的执行顺序测试方法
public class Test { static{ System.out.println("静态区"); } { System.out.println("非静态!"); } private int i; public Test(int i) { super(); this.i = i; } pu ...
分类:其他好文   时间:2016-09-14 18:59:14    阅读次数:108
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!