码迷,mamicode.com
首页 >  
搜索关键字:iostream    ( 13291个结果
c++ 拷贝构造函数
1.拷贝构造函数代码: 当类对象用于值传递时,会调用拷贝构造函数 #include<iostream> using namespace std; class CExample { private: int a; public: //构造函数 CExample(int b) { a=b; printf ...
分类:编程语言   时间:2021-02-04 11:44:47    阅读次数:0
c++学习草稿
循环 1 #include<iostream> 2 3 using namespace std; 4 int main() 5 { 6 int my_array[] = { 1,2,3,4,5,6,7,8 }; 7 // 不会改变 my_array 数组中元素的值 8 // x 将使用 my_arr ...
分类:编程语言   时间:2021-02-04 11:44:06    阅读次数:0
HDU4089Activation
Aimee 想出状态转移的难度很小 很强的题解 #include<iostream> #include<cstdio> #include<cmath> #include<algorithm> #include<cstring> using namespace std; const int maxn= ...
分类:其他好文   时间:2021-02-03 10:32:32    阅读次数:0
Hie with the Pie
Aimee 很显然的状压dp $f_{i,j}$表示在i这个集合,最后停在了j时的最小长度 转移就行了 #include<iostream> #include<cstdio> #include<algorithm> #include<cstring> using namespace std; int ...
分类:其他好文   时间:2021-02-02 11:22:43    阅读次数:0
cf-754 D Fedor and coupons(优先队列+区间贪心)
https://codeforces.com/problemset/problem/754/D 题意: 给定n组区间,要求选出k组区间保证其交集最大,并输出选出的区间 思路: 区间贪心,优先队列算一下天数即可。 代码: #include<iostream> #include<stdio.h> #in ...
分类:其他好文   时间:2021-02-02 10:51:00    阅读次数:0
按引用传递参数
#include <iostream>using namespace std; const double pi = 3.14159;//double Area(double radius)//{// double result = 0;// return result = pi * radius * ...
分类:其他好文   时间:2021-02-02 10:32:23    阅读次数:0
CSP算法题基础(1)
CSP算法题基础 C++程序里面会添加许多头文件,头文件的格式一般是 1763#include<头文件名> 我们先接触这两个头文件cstdio和iostream,其中cstdio包含了两个函数printf输出函数和scanf输入函数;第二个头文件是iostream,主要包含了cin,cout,end ...
分类:编程语言   时间:2021-02-01 12:55:52    阅读次数:0
AtCoder Beginner Contest 190
A: Takahashi和Aoki分别有A和B颗糖果,两人轮流吃一个,若C为0则Takahashi先吃,C为1则Aoki先吃,先吃完的为输。 1 #include <iostream> 2 #include <cstdio> 3 #include <vector> 4 #include <algor ...
分类:其他好文   时间:2021-02-01 12:36:03    阅读次数:0
AcWing 1351. 密码锁
原题链接 考察:暴力枚举 完全是因为有容斥原理才做了这题,结果这题和容斥原理有啥关系... 思路: dfs枚举所有可能性 1 #include <iostream> 2 #include <algorithm> 3 #include <set> 4 #include <vector> 5 using ...
分类:Windows程序   时间:2021-02-01 12:23:26    阅读次数:0
C++ 二叉树知识点
/** * C++ 语言: 二叉查找树 * * @author skywang * @date 2013/11/07 */ #ifndef _BINARY_SEARCH_TREE_HPP_ #define _BINARY_SEARCH_TREE_HPP_ #include <iomanip> #in ...
分类:编程语言   时间:2021-02-01 11:49:33    阅读次数:0
13291条   上一页 1 ... 16 17 18 19 20 ... 1330 下一页
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!