码迷,mamicode.com
首页 >  
搜索关键字:cout    ( 7219个结果
c++:hello world!
#include <iostream> using namespace std; void main() { cout<<"hello world"<<endl; } 1 #include <iostream> 2 using namespace std; 3 void main() 4 { 5 c ...
分类:编程语言   时间:2020-06-10 21:05:01    阅读次数:65
【模板】堆
P3378 【模板】堆 #include <iostream> #include <cstring> #include <cstdio> using namespace std; const int N = 1e6; int h[N], s; void up(int u) { while(u / 2 ...
分类:其他好文   时间:2020-06-10 17:17:55    阅读次数:67
HW18-广搜
A:Saving Tang Monk 总时间限制: 1000ms 内存限制: 65536kB描述 《Journey to the West》(also 《Monkey》) is one of the Four Great Classical Novels of Chinese literature. ...
分类:其他好文   时间:2020-06-09 23:56:43    阅读次数:153
6.9 VJ F - Yet Another Tetris Problem
#include<bits/stdc++.h>#define ll long long#define speed_up ios::sync_with_stdio(false);cin.tie(0);cout.tie(0);using namespace std;/*俄罗斯方块游戏题意:有n个数,从左 ...
分类:其他好文   时间:2020-06-09 20:18:52    阅读次数:45
PAT字符串处理题---1006 换个格式输出整数 (15分)
1006 换个格式输出整数 (15分) #include<iostream> #include<string> #include<cstdio> using namespace std; int main(){ int n;cin>>n; string s=to_string(n); if(s.le ...
分类:其他好文   时间:2020-06-09 18:12:55    阅读次数:51
void out2() const{
#include "stdafx.h" #include using namespace std; class aa{ int num; public: aa(); void out1(){ cout<<num<<endl; } void out2() const{ cout<<num<<endl; ...
分类:其他好文   时间:2020-06-09 11:19:22    阅读次数:69
线性dp—奶牛渡河
题目 Farmer John以及他的N(1 <= N <= 2,500)头奶牛打算过一条河,但他们所有的渡河工具,仅仅是一个木筏。 由于奶牛不会划船,在整个渡河过程中,FJ必须始终在木筏上。在这个基础上,木筏上的奶牛数目每增加1,FJ把木筏划到对岸就得花更多的时间。 当FJ一个人坐在木筏上,他把木筏 ...
分类:其他好文   时间:2020-06-07 21:09:44    阅读次数:73
string
一、string对象操作string str1、str.c_str() 返回const char* 2、两个字符串不能挨着相加 "abc" + "de" // 错误, // 因为两个字符串直接相加,不知道得到的是什么类型,会导致编译错误; "abc" + s + "de" //正确, // 其中s ...
分类:其他好文   时间:2020-06-07 12:54:18    阅读次数:61
编译测试程序
#include <event2/event.h> #include <iostream> using namespace std; int main() { cout << "test libevent.\n"; event_base * base = event_base_new(); if ( ...
分类:其他好文   时间:2020-06-07 12:46:53    阅读次数:52
成环间隔01背包
#include using namespace std; //算法提高 种树 //这是01背包问题的变形 //环的处理方法 1.找到最小值的位置,预处理数组,比如 56 21 64 32 45 -> 21 64 32 45 56 21 //这样就相邻了而且21 21肯定不会同时选到 //2.还可以... ...
分类:其他好文   时间:2020-06-06 21:43:45    阅读次数:71
7219条   上一页 1 ... 34 35 36 37 38 ... 722 下一页
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!