码迷,mamicode.com
首页 >  
搜索关键字:cout    ( 7219个结果
VJ A - Three Indices 7.26
#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;const ll nl=1e5+5;/ ...
分类:其他好文   时间:2020-07-26 23:23:20    阅读次数:105
二分查找模板2
题目相关链接传送门: 1.https://blog.csdn.net/justidle/article/details/104593327?utm_medium=distribute.pc_relevant.none-task-blog-baidujs-5&spm=1001.2101.3001.42 ...
分类:其他好文   时间:2020-07-26 19:07:56    阅读次数:66
排列与组合
排列 #include<iostream> #include<iomanip> using namespace std; int a[25]; bool b[25]; int n,m; void print() { for(int i=1;i<=m;i++) cout<<setw(3)<<a[i]; ...
分类:其他好文   时间:2020-07-26 15:48:22    阅读次数:54
001. cpp primer快速入门
最简单的c++程序: #include<iostream> using namespace std; int main() { cout << "hello,world!" << endl; system("pause"); return 0; } 注解:cout定义在头文件中iostream中。c ...
分类:其他好文   时间:2020-07-26 15:37:02    阅读次数:67
32,初探c++标准库
1. 有趣的重载 (1)操作符<<:原义是按位左移,重载“<<”可将变量或常量左移到对象中 重载左移操作符(仿cout类) 1 #include<stdio.h> 2 3 const char endl = '\n'; //将换行定义为一个常量 4 5 class Console //Console ...
分类:编程语言   时间:2020-07-26 02:01:24    阅读次数:69
C++的vector的使用方法
vector c++的vector的使用方法,创建,初始化,插入,删除等。 #include "ex_vector.h" #include <iostream> #include <vector> #include <string> using namespace std; void ex_vect ...
分类:编程语言   时间:2020-07-26 01:46:42    阅读次数:60
题目 1084: 用筛法求之N内的素数
类型:有关素数的基础算法 思路:埃氏筛选 AC代码: #include<iostream> #include<cstring> #include<algorithm> using namespace std; const int MAX_N=10000000; int prime[MAX_N]; b ...
分类:其他好文   时间:2020-07-26 01:30:40    阅读次数:73
2020百度之星程序设计大赛初赛二
A. Poker (Hdu ????) 题目大意 给定n个币,每次投至少m个,当投$x$个时,给回$\lfloor x \times (1 - p %) \rfloor$。问你最多能投多少次。 解题思路 很显然每次投$m$元是最优的,因为但凡投$m+1$元,给回的钱数不可能会增加二,要不不变要不减少 ...
分类:其他好文   时间:2020-07-26 01:12:43    阅读次数:213
面试题22:链表中倒数第k个节点
考察链表的操作,注意使用一次遍历。相关题目:求链表的中间节点。 C++版 #include <iostream> #include <algorithm> using namespace std; // 定义链表 struct ListNode{ int val; struct ListNode* ...
分类:其他好文   时间:2020-07-26 00:41:33    阅读次数:55
2020 Multi-University Training Contest 1-1004 Distinct Sub-palindromes
http://acm.hdu.edu.cn/showproblem.php?pid=6754 题意: 字符串由小写字母构成 求 长度为N的 回文子串数量最少的 字符串的个数 思路: 长度为1的串 回文子串最少1个 形式:a 长度为2的串 回文子串最少2个 形式:aa / ab 长度为3的串 回文子串 ...
分类:其他好文   时间:2020-07-26 00:24:53    阅读次数:55
7219条   上一页 1 ... 20 21 22 23 24 ... 722 下一页
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!