码迷,mamicode.com
首页 >  
搜索关键字:std    ( 41627个结果
[Zjoi2014]力 FFT
#include#include#include#include#includeusing namespace std;typedef double dd;const dd pi=acos(0.0)*2;#define N 400005struct P{ dd x,y; P(dd A=0...
分类:其他好文   时间:2014-05-17 03:38:45    阅读次数:248
H 1022 Train Problem Ⅰ
题意:给我们两个序列,看能否通过压栈,出栈将第一个序列转换成第二个。思路:将序列 1 依次压栈,同时看是否和序列 2 当前元素相同代码如下:#include#include#define max 100using namespace std;int main(){ stacks; int...
分类:其他好文   时间:2014-05-17 01:47:36    阅读次数:218
hust 1074
这是错误程序#include#include#include#include#include#includeusing namespace std;mapcow;int main(){ //freopen("in.txt","r",stdin); char str[1000],name[...
分类:其他好文   时间:2014-05-17 00:59:53    阅读次数:266
杭电2014
1 #include 2 #include 3 using namespace std; 4 5 int main() 6 { 7 int n; 8 double max,min,sum,aver; 9 double a[110] = {0};10 while...
分类:其他好文   时间:2014-05-16 22:47:35    阅读次数:452
杭电 2012
1 #include 2 3 using namespace std; 4 5 int is_prime(int ); 6 int main() 7 { 8 int x,y,val; 9 while (cin>>x>>y && x||y)10 {11 ...
分类:其他好文   时间:2014-05-16 22:43:26    阅读次数:335
【工作中学习2】Map的使用及排序(第三个参数)
项目进行中,使用到Map(std::map),Map要点整理如下: 1. Map,也叫关联数组,提供key/value(键/值对),key用来索引,value是被存储和检索的数据。 2. key值唯一(Multimap除外)。 3. Map的内部数据结构是红黑树。 3. 可以用下标操作符...
分类:其他好文   时间:2014-05-16 22:31:02    阅读次数:379
复习一下单链表的常用操作
复习一下单链表的常用操作,包括单链表的创建、插入、删除、排序、逆置以及打印输出等。#includeusing namespace std;typedef struct Single_link{ int data; struct Single_link *next;}node;//单链表的...
分类:其他好文   时间:2014-05-16 22:14:34    阅读次数:397
c++ 比较两个集合
要先std::sortstd::set_differencestd::set_union
分类:编程语言   时间:2014-05-16 20:13:07    阅读次数:226
杭电2019
1 #include 2 using namespace std; 3 4 int main() 5 { 6 int a[110] = {0};//已经排好的 7 int n,m; 8 while (cin>>n>>m && n||m) 9 {10 ...
分类:其他好文   时间:2014-05-14 09:43:38    阅读次数:407
std::map中函数用法集合
1 STL的map表里有一个erase方法用来从一个map中删除掉指令的节点 2 eg: 3 map mapTest; 4 typedef map::iterator ITER; 5 ITER iter=mapTest.find(key); 6 mapTest.erase(iter...
分类:其他好文   时间:2014-05-14 09:19:03    阅读次数:319
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!