码迷,mamicode.com
首页 >  
搜索关键字:std    ( 41627个结果
poj--2608
题意:模拟题,用字母模拟数字,没有数字代表的则跳过,有数则代表但是连续多组的只输出一个。具体代码:#include#include#includeusing namespace std;int zimu[26]={0,1,2,3,0,1,2,0,0,2,2,4,5,5,0,1,2,6,2,3,0,1...
分类:其他好文   时间:2014-05-19 19:55:40    阅读次数:164
poj--2782
题意:贪心,排序后大数与小数相加具体代码:#include #include #include #include #include using namespace std;#define maxn 100005int n, m;int f[maxn];int cmp(int a, int b){ ....
分类:其他好文   时间:2014-05-19 19:42:31    阅读次数:233
hdu 3038 How Many Answers Are Wrong
http://acm.hdu.edu.cn/showproblem.php?pid=3038 1 #include 2 #include 3 #include 4 #define maxn 600000 5 using namespace std; 6 7 int f[maxn],d[max...
分类:其他好文   时间:2014-05-19 18:51:33    阅读次数:252
无限逼近思想
//#define LOCAL#include#includeusing namespace std;int const MAX_N=100001;int const INF=10000000;int N,M,x[MAX_N];void init(){ for(int i=0;i1) {...
分类:其他好文   时间:2014-05-19 17:20:45    阅读次数:204
HDU 1573 X问题 (中国剩余定理)
题目链接题意 : 中文题不详述。思路 : 中国剩余定理。求中国剩余定理中解的个数。看这里看这里 1 //1573 2 #include 3 #include 4 #include 5 6 using namespace std ; 7 8 long long x,y ; 9 long lo...
分类:其他好文   时间:2014-05-19 16:48:21    阅读次数:207
C++ 单链表模板类实现
单链表的C语言描述基本运算的算法——置空表、求表的长度、取结点、定位运算、插入运算、删除运算、建立不带头结点的单链表(头插入法建表)、建立带头结点的单链表(尾插入法建表),输出带头结点的单链表#include#includeusing namespace std;template class Lin...
分类:编程语言   时间:2014-05-19 11:55:01    阅读次数:541
使用引用交换两个数字
#include using namespace std; //定义一个函数,用于交换两个变量的值 void swap(int &a, int &b); void main() { int i = 3, j = 5; cout<<"交换前:i="<<i<<" j="<<j<<endl; swap(i,j); cout<<"交换后:i="<<i<<" j="<<j<<endl;...
分类:其他好文   时间:2014-05-18 16:05:54    阅读次数:209
Codeforces Round #246 (Div. 2)
A、Choosing Teams 水题 #include #include using namespace std; int main() { int n, k, ans, i, x; scanf("%d%d",&n,&k); ans = 0; for(i=0; i<n; ++i) { scanf("%d",&x);...
分类:其他好文   时间:2014-05-18 10:53:23    阅读次数:262
Codeforces #246(div2)
A:A. Choosing Teams .题目就不介绍了,直接统计即可。 AC代码: #include #include #include using namespace std; int cnt[6]; int main() { int n,k,i,x; while(cin>>n>>k) { memset(cnt,0,sizeof(cnt));...
分类:其他好文   时间:2014-05-18 08:41:02    阅读次数:233
数据结构与算法一
题目一:求1!+2!+…..+n! 的和的后6位,(注意n的范围) #include using namespace std; const int MAX = 1000000; int getResu(int n) { int sum=0; int temp= 1; for(int i=1; i <= n; i++) { temp *= i; temp %= MAX; ...
分类:其他好文   时间:2014-05-18 03:36:19    阅读次数:223
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!