码迷,mamicode.com
首页 >  
搜索关键字:cin    ( 7874个结果
hdu 5012 bfs --- 慎用STL 比如MAP判重
http://acm.hdu.edu.cn/showproblem.php?pid=5012 先贴一份自己的TLE 代码, 超时应该是因为: 1、cin 2、map判重 map find太花时间 3、string花时间 #include #include #include #include #include #include #include using names...
分类:其他好文   时间:2014-10-05 03:32:27    阅读次数:239
hdu 5036 Explosion
学了下bitset#include #include #include using namespace std;const int N=1005;bitseta[N];int t,n,cas=1,c;int main(){ cin>>t; while(t--){ scanf...
分类:其他好文   时间:2014-10-03 03:05:03    阅读次数:166
【水】vijosP1141 最小非负值
P1141最小非负值描述输入一个自然数n(ngetline(cin,st);这里不要写什么infile outfile了,直接写cin经验证无错代码//我对代码长度不是很在意,短码写着累看着也累啊(我也写不好……)#include#include using namespace std;int a....
分类:其他好文   时间:2014-10-02 00:31:21    阅读次数:398
最长单调递增子序列
http://acm.fzu.edu.cn/problem.php?pid=1348const int maxn = 1008 ;int a[maxn] , c[maxn] ;int main(){ int i , n , m ; while(cin>>n){ ...
分类:其他好文   时间:2014-10-01 15:32:11    阅读次数:243
杭电2055 另一种
可以用C++来写,就可以回避这个问题#includeusing namespace std;int main(){ int num; char k; int y,x; while(cin>>num) { while(num--) { ...
分类:其他好文   时间:2014-10-01 11:56:21    阅读次数:142
c++大数板子
#include #include #include #include using namespace std; typedef long long ll; /* * 完全大数模板 * 输出cin>>a * 输出a.print(); * 注意这个输入不能自动去掉前导0的,可以先读入到char数组,去掉前导0,再用构造函数。 * by kuangbin GG. */ #defi...
分类:编程语言   时间:2014-09-28 23:31:29    阅读次数:397
C++的IO操作
#include using namespace std; int main() {         char name[20];         char gender;         int age;         cout         cin >> name >> gender >> age;         cout         cout     ...
分类:编程语言   时间:2014-09-28 17:50:25    阅读次数:215
2014秋C++第5周项目1参考-见识初学者常见错误
【项目1】声明:(1)下面的提示,是ideone.com中的提法出现的错误提示,在其他平台中,可能会有不同的描述,但意思一般相同;(2)鉴于同学们刚学,不能用太专业和深入的解释,下面的提示只追求让同学有体会即可,随着学习的进展,你自己可以给出完整的解释。(1)将第6行cin>>a>>b; 一行末尾的分号去掉系统提示“編譯失敗(CE)”具体地:1. prog.cpp: In function ‘in...
分类:编程语言   时间:2014-09-28 13:11:53    阅读次数:206
ACM_java输入输出优化
今天的网络赛居然卡java的Scanner 。。。sad 欺负我是java新手啊  赛后看了大牛的写法,原来是输入输出有优化。。。。。。。要醉了。 StreamTokenizer和PrintWriter    但是用Scanner输入就像cin那样比较慢,当数据量一大会超时的,此时不得不用StreamTokenizer   和  PrintWriter import java.i...
分类:编程语言   时间:2014-09-27 23:37:00    阅读次数:493
hdu 5050 Divided Land(JAVA高精度)
import java.util.Scanner;import java.math.BigInteger;public class Main { public static void main(String[] args) { Scanner cin=new Scanner(Sy...
分类:编程语言   时间:2014-09-27 23:04:30    阅读次数:254
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!