码迷,mamicode.com
首页 >  
搜索关键字:namespace    ( 41927个结果
血型统计
/* *copyright(c) 2014,烟台大学计算机学院 *All rights reserved。 *文件名称:测试控制符号 *作者:王忠 *完成日期:2014.10.30 *版本号:v1.0 * *问题描述:血型序列统计 *输入描述:输入血型数列 *程序输出:血型及其数量 #include using namespace std; int main() { ...
分类:其他好文   时间:2014-11-02 21:02:38    阅读次数:240
PAT 1031 Hello World for U
#include #include #include using namespace std;char line[82];char space[82];int main() { scanf("%s", line); int len = strlen(line); int side_...
分类:其他好文   时间:2014-11-02 21:00:48    阅读次数:177
hdu5091 线段树
题意: 给了n个点在平面中 n#include #include #include #include using namespace std;const int maxn = 10005;typedef int ll;struct point{ ll x,y; point(ll a=0, ll .....
分类:其他好文   时间:2014-11-02 20:57:18    阅读次数:195
PAT 1027 Colors in Mars
#include #include #include using namespace std;char tbl[] = { '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', 'A',...
分类:其他好文   时间:2014-11-02 20:45:41    阅读次数:163
[C++] 基础知识点:namespace
Show the code: #include using namespace std; namespace CounterNameSpace { int upperbound; int lowerbound; class Counter { int count; public: Counter(int n) { if (n <= upperbound) { count = n; } els...
分类:编程语言   时间:2014-11-02 19:46:41    阅读次数:224
HDU 5091 线段树扫描线
给出N个点,和一个w*h的矩形 给出N个点的坐标,求该矩形最多可以覆盖多少个点 对每个点point(x,y)右边生成对应的点(x+w,y)值为-1; 纵向建立线段树,从左到右扫描线扫一遍,遇到点则用该点的权值更新区间(y,y+h) #include "stdio.h" #include "string.h" #include "algorithm" using namespace ...
分类:其他好文   时间:2014-11-02 19:43:33    阅读次数:222
HDU 5094 状压BFS
给出n*m矩阵 给出k个障碍,两坐标之间存在墙或门,门最多10种, 给出s个钥匙位置及编号,相应的钥匙开相应的门 状压BFS即可,注意有可能同一个位置有多个门或者多个钥匙 #include "stdio.h" #include "string.h" #include "queue" using namespace std; int b[]={1,2,4,8,16,32,64,12...
分类:其他好文   时间:2014-11-02 19:43:22    阅读次数:123
矩形的个数
矩形的个数描述在一个3*2的矩形中,可以找到6个1*1的矩形,4个2*1的矩形3个1*2的矩形,2个2*2的矩形,2个3*1的矩形和1个3*2的矩形,总共18个矩形。给出A,B,计算可以从中找到多少个矩形。输入本题有多组输入数据(using namespace std; int main(){lon...
分类:其他好文   时间:2014-11-02 18:09:53    阅读次数:211
大小写互换
大小写互换描述 现在给出了一个只包含大小写字母的字符串,不含空格和换行,要求把其中的大写换成小写,小写换成大写,然后输出互换后的字符串。输入第一行只有一个整数m(m#include using namespace std; char inverse(char ch) { if(ch>=...
分类:其他好文   时间:2014-11-02 18:09:24    阅读次数:153
小明的调查作业
小明的调查作业描述小明的老师布置了一份调查作业,小明想在学校中请一些同学一起做一项问卷调查,聪明的小明为了实验的客观性,想利用自己的计算机知识帮助自己。他先用计算机生成了N个1到1000之间的随机整数(0 #include using namespace std; int main() { int ...
分类:其他好文   时间:2014-11-02 18:08:49    阅读次数:126
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!