码迷,mamicode.com
首页 >  
搜索关键字:cin    ( 7874个结果
Subsequence
DescriptionA sequence of N positive integers (10 >T;33 while(T--)34 {35 cin>>n>>S;36 for(int i=0;i>a[i];38 solve();39 ...
分类:其他好文   时间:2014-09-01 19:22:33    阅读次数:216
cin、cin.get()、cin.getline()、getline()、gets()等函数的用法
学C++的时候,这几个输入函数弄的有点迷糊;这里做个小结,为了自己复习,也希望对后来者能有所帮助,如果有差错的地方还请各位多多指教(本文所有程序均通过VC 6.0运行)转载请保留作者信息;1、cin1、cin.get()2、cin.getline()3、getline()4、gets()5、getc...
分类:其他好文   时间:2014-09-01 17:13:13    阅读次数:304
《C++primer》v5 第11章 关联容器 读书笔记 习题答案
11.1map是关联容器,vector是顺序容器11.2略11.3int main(){ map word; string s; while(cin>>s) word[s]++; for(auto i:word) cout word; str...
分类:编程语言   时间:2014-08-31 10:26:41    阅读次数:426
Codeforces Round #264 (Div. 2)[ABCDE]
Codeforces Round #264 (Div. 2)[ABCDE] ACM 题目地址: Codeforces Round #264 (Div. 2) 这场只出了两题TAT,C由于cin给fst了,D想到正解快敲完了却game over了...  掉rating掉的厉害QvQ... A - Caisa and Sugar【模拟】 题意:  Cai...
分类:其他好文   时间:2014-08-30 21:46:20    阅读次数:403
Codeforces Round #264 (Div. 2)
这场是我人生第一场cf啊。。悲剧处处是啊。首先,看不懂题,完全理解不了啊。都是wa了好几次才过的所以a和b这两sb题我做了1个小时!然后c这题我用cin。。。。。。。悲剧因为我听说cf评测机很快!!rating掉了73,1300名啊,如果c没tle。。。。就到300名了。。。以后一定要小心!小心!小...
分类:其他好文   时间:2014-08-30 19:01:59    阅读次数:221
《C++primer》v5 第10章 泛型算法 读书笔记 习题答案
10.1using namespace std;int main(){ vector vec; int a; cin>>a; int v; while(cin>>v) vec.push_back(v); cout l; string a; ...
分类:编程语言   时间:2014-08-30 16:21:59    阅读次数:203
HDU 1754 I Hate it
题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=1754思路:线段树入门题目..刚学的,拿来练手。可以当作区间更新点的模板用,另外得注意,这个题用cin必定超时~.....代码: #include #define MAXSIZE 200001using....
分类:其他好文   时间:2014-08-30 15:07:29    阅读次数:246
UVa 10127 - Ones
题目:求一个全是1组成的最小可以整除n的数。 分析:数论,模拟。每次保留mod n的余数乘以10加1即可。 说明:每天一水题。 #include #include #include using namespace std; int main() { int n; while (cin >> n) { int value = 1,count = 1; while (val...
分类:其他好文   时间:2014-08-29 22:43:08    阅读次数:236
C++primer学习笔记(三)——Chapter 5
5.1 Simple Statements 1、记得每个语句后面加上”;”不过现在编译器都有实时编译,一般都不会忘记的, 2、空语句 (1)就是啥都没有。只有一个“;” (2)还是有很多用处的,例如 while (cin>>s && s!= sought) ; 不停的监测是不是输入的是sought,...
分类:编程语言   时间:2014-08-29 09:27:27    阅读次数:309
STL中简单算法实例sort()、next_permutation()
STL中简单算法实例sort()、next_permutation()#include<iostream> #include<string> #include<algorithm> usingnamespacestd; intmain() { stringletters; cout<<"Enterthelettersgrouping(quittoquit):"; while(cin>>letters&&letter..
分类:其他好文   时间:2014-08-29 03:03:17    阅读次数:242
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!