码迷,mamicode.com
首页 >  
搜索关键字:cin    ( 7874个结果
【转载】探寻C++最快的读取文件的方案
原文地址:https://www.byvoid.com/blog/fast-readfile/在竞赛中,遇到大数据时,往往读文件成了程序运行速度的瓶颈,需要更快的读取方式。相信几乎所有的C++学习者都在cin机器缓慢的速度上栽过跟头,于是从此以后发誓不用cin读数据。还有人说Pascal的read语...
分类:编程语言   时间:2014-08-27 20:28:58    阅读次数:317
类成员函数的 重载、覆盖和隐藏区别
重载:成员函数被重载的特征:(1)相同的范围(在同一个类中);(2)函数名字相同;(3)参数不同;(4)virtual 关键字可有可无。 1 #include 2 3 using std::cin; 4 using std::cout; 5 using std::endl; 6 7 class...
分类:其他好文   时间:2014-08-27 18:13:48    阅读次数:173
codeforces 367B
题目代码到是不难但是很难想通题目的解决方法。#includeusing namespace std;int person[110];int main(){ int n,m; while(cin>>n>>m) { memset(person,0,sizeof(perso...
分类:其他好文   时间:2014-08-27 14:41:57    阅读次数:199
poj3624_Charm Bracelet (01背包问题)
01背包问题:推荐资料《背包问题九讲》 #include using namespace std; int cost,ans,val,n,V,f[12890]; int maxm(int a,int b){ if(a>b) return a; return b; } int main(){ cin>>n>>V; for(int i=0;i<n;i++){ ...
分类:其他好文   时间:2014-08-26 17:20:56    阅读次数:279
C++中动态申请二维数组
这里主要介绍C++中动态申请二维数组的两种方式,直接给出代码,很容易明白,简单的作为一个笔记。 #include #include // 输入输出操纵 #include using namespace std; // 法一:new 方式申请 void dynamicArray() { int rows, cols; cin >> rows >> cols; i...
分类:编程语言   时间:2014-08-26 15:31:46    阅读次数:191
codeforces round #262 (div2)
这个是前几天作的比赛,因为今晚上还有CF所以就把前几天写的东西总结一下。     460A  直接模拟题意,不过我在作的过程中一直担心余数会对结果产生影响。    #include #include using namespace std; int main() { int n,m; cin>>n>>m; for(int i=n;;i++) {...
分类:其他好文   时间:2014-08-26 13:41:28    阅读次数:228
URAL 1409 Two Gangsters
A + B + 1 1 import java.util.Scanner; 2 3 public class P1409 4 { 5 public static void main(String args[]) 6 { 7 try (Scanner cin = ne...
分类:其他好文   时间:2014-08-26 09:48:46    阅读次数:197
URAL 1319 Hotel
还是斜着数 1 import java.util.Scanner; 2 3 public class P1319 4 { 5 public static void main(String args[]) 6 { 7 try (Scanner cin = new Sc...
分类:其他好文   时间:2014-08-26 09:44:55    阅读次数:207
URAL 1313 Some Words about Sport
斜着数 1 import java.util.Scanner; 2 3 public class P1313 4 { 5 public static void main(String args[]) 6 { 7 try (Scanner cin = new Scan...
分类:其他好文   时间:2014-08-26 09:42:05    阅读次数:220
URAL 1264 Workdays
原来是道 A * B 1 import java.util.Scanner; 2 3 public class P1264 4 { 5 public static void main(String args[]) 6 { 7 try (Scanner cin = n...
分类:其他好文   时间:2014-08-26 09:41:35    阅读次数:256
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!