码迷,mamicode.com
首页 >  
搜索关键字:namespace    ( 41927个结果
hdu 2614 beat
这题最难得地方在于把题目看懂,简单的dfs,没什么好说的 #include #include #define maxn 15+1 using namespace std; int maxx; int mapp[maxn][maxn]; int visit[maxn]; int n; void dfs(int x,int time,int num) { for(int i=1;i<=n;i++)...
分类:其他好文   时间:2015-04-17 01:19:00    阅读次数:142
toj 4111 组合数取模 暴力分解
题目大意:组合数取模,n和m并不算大,p比较大且是合数。思路:暴力分解+快速幂注:暴力也是有区别的,分解质因数时可以用以下work函数,写的非常巧妙,摘录自互联网。 1 #include 2 #include 3 using namespace std; 4 5 typedef long lo...
分类:其他好文   时间:2015-04-17 01:09:05    阅读次数:187
dbserver
using System;using System.Collections.Generic;using System.Linq;using System.Text;using System.Data.SqlClient;using System.Data;namespace 线程{ class...
分类:数据库   时间:2015-04-17 01:07:30    阅读次数:123
Java是类型安全的语言,而C++是非类型安全的?【解释】
有过C++开发经验的人会发现,我们可以将0作为false,非零作为true。一个函数即使是bool类型的,但是我们还是可以返回int类型的,并且自动将0转换成false,非零转换成true。代码实例如下: #include #include using namespace std; bool fun()//函数返回类型是bool,但是我们在函数中可以返回int类型。 { return ...
分类:编程语言   时间:2015-04-16 23:50:32    阅读次数:287
Codeforces Round #140 (Div. 1) Naughty Stone Piles 贪心
#include #include #include #include #include using namespace std; const int maxn = 1000010; __int64 sum[maxn] ; __int64 num[maxn]; __int64 ans[maxn]; __int64 vis[maxn] ; __int64 query; __i...
分类:其他好文   时间:2015-04-16 23:49:50    阅读次数:258
二叉排序树(c++实现)
#include using namespace std; class btree { public: btree *left; btree *right; int data; btree(int i):left(NULL),right(NULL),data(i){} ~btree(); void insert(int a); static void inorder(...
分类:编程语言   时间:2015-04-16 23:49:18    阅读次数:372
Codeforces Round #139 (Div. 2)C Barcode DP
#include #include #include using namespace std ; const int maxn = 1010; const int inf = 0x3f3f3f3f ; int dp[maxn][2] ; char str[maxn][maxn] ; int num[maxn]; int sum_b[maxn]; int sum_w[maxn]; int main(...
分类:其他好文   时间:2015-04-16 23:48:07    阅读次数:228
Codeforces Round #140 (Div. 1)D The table 贪心
#include #include #include using namespace std ; const int maxn = 110 ; int sum_r[maxn] ; int sum_c[maxn] ; int vis_c[maxn] ;int vis_r[maxn] ; int ans_c[maxn] ;int ans_r[maxn] ; int table[max...
分类:其他好文   时间:2015-04-16 23:47:29    阅读次数:153
JS工具
/** * @author Direction *//** * JALJA 命名空间 namespace */var JALJA= {} ;/** * Interface Class * 接口类需要2个参数 * 参数1: 接口的名字 (string) * 参数2: 接受方法名称的集合(数组) (.....
分类:Web程序   时间:2015-04-16 23:40:41    阅读次数:211
PAT 链表倒序的算法优化
之前的答案错误问题已经解决了,现在还有运行超时的问题,先贴上之前的代码 1 #include 2 #include 3 using namespace std; 4 5 int main() 6 { 7 int count, renum; 8 string add; 9 ...
分类:编程语言   时间:2015-04-16 23:40:30    阅读次数:267
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!