码迷,mamicode.com
首页 >  
搜索关键字:namespace    ( 41927个结果
exercises 2.35
1 #include 2 using namespace std; 3 4 5 int main() 6 { 7 const int i=42; 8 auto j=i; 9 const auto &k=i;10 auto *p=&i;11 co...
分类:其他好文   时间:2015-04-13 20:43:44    阅读次数:108
toj 1196 栈的运用(模拟浏览器)
两个栈来模拟浏览器的操作,简单模拟。 1 #include 2 #include 3 #include 4 using namespace std; 5 6 stack forward; 7 stack back; 8 9 int main ()10 {11 string cur(...
分类:其他好文   时间:2015-04-13 20:41:47    阅读次数:107
【主席树】bzoj2588 Spoj 10628. Count on a tree
每个点的主席树的root是从其父转移来的。询问的时候用U+V-LCA-FA(LCA)即可。#include#includeusing namespace std;#define N 100001int v[N>1); T[cur].lc=++e; BuildTree(T[cur].lc,l,m); ...
分类:其他好文   时间:2015-04-13 20:40:23    阅读次数:139
exercises 2.34
1 #include 2 using namespace std; 3 4 5 int main() 6 { 7 int i=0,&r=i; 8 auto a=r; 9 10 const int ci=i,&cr=ci;...
分类:其他好文   时间:2015-04-13 20:35:42    阅读次数:107
求一个字符串中连续出现次数最多的子串
#include#includeusing namespace std;int main(void){ int pos1,pos2,pos3,offset,temp=1,count=0; string str="bcdcdcdcdcdcdbcdasfabababds"; ...
分类:其他好文   时间:2015-04-13 20:24:37    阅读次数:96
UVa 10954 (Huffman 优先队列) Add All
直接用一个优先队列去模拟Huffman树的建立过程。每次取优先队列前两个数,然后累加其和,把这个和在放入到优先队列中去。 1 #include 2 #include 3 using namespace std; 4 5 int main() 6 { 7 int n; 8 whi...
分类:其他好文   时间:2015-04-13 20:22:15    阅读次数:192
poj 1321
思路:有点枚举的意思 基本的分支限界#include#includeusing namespace std;int a[11];char map[11][11];int n,k;int sum;void dfs(int t,int x)// 行号 需要放置的皇后数{ int i,j; i...
分类:其他好文   时间:2015-04-13 20:19:33    阅读次数:118
abstract 关键字-- 抽象
代码: 1 using System; 2 3 namespace Console_Test 4 { 5 class Program 6 { 7 public abstract class MyClas 8 { 9 /// 1...
分类:其他好文   时间:2015-04-13 20:16:53    阅读次数:122
.net 提取 json 数据
.net 提取 json 数据. HttpHelper.cs using System; using System.Collections.Generic; using System.Linq; using System.Web; using System.Net; using System.Text; using System.IO; namespace Weixin.Common {...
分类:Web程序   时间:2015-04-13 19:04:57    阅读次数:129
题目1145:Candy Sharing Game
题目描述:     A number of students sit in a circle facing their teacher in the center. Each student initially has an even number of pieces of candy. When the teacher blows a whistle, each student simult...
分类:其他好文   时间:2015-04-13 19:01:10    阅读次数:134
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!