码迷,mamicode.com
首页 >  
搜索关键字:iostream    ( 13291个结果
16进制输入 与 输出
类型用__int64 占位符为%I64X 负数加负数会爆 因为底层还是二进制运算 二进制最大位为1则为负数 转换回来就很大了 而且十六进制不会输出正负号 ```c++ #include<iostream>using namespace std;int main(){ __int64 a,b; whi ...
分类:其他好文   时间:2021-03-18 14:33:04    阅读次数:0
POJ2255 Tree Recovery 题解 根据前序+中序求二叉树的后序遍历
题目链接:http://poj.org/problem?id=2255 递归经典习题。具体见代码: #include <iostream> #include <cstring> using namespace std; char a[111], b[111]; void dfs(int L1, in ...
分类:其他好文   时间:2021-03-18 14:30:29    阅读次数:0
Codeforces Round #678 (Div. 2)A B C 题解
题意&思路:Wuuuu~,其实就是问总和是不是为M #include<iostream> #include<cstring> #include<cmath> #include<algorithm> #define rep(i,n) for(i=1;i<=n;++i) #define ms(a,n) ...
分类:其他好文   时间:2021-03-18 14:17:01    阅读次数:0
关于c++中移位操作符的一点坑
1.对于 1<<(32或者更大),答案都是正常处理得到0 2.但是假如说1<<(x),x为一个变量,那么在移位前x会对32取模 ###验证 使用vs2019的c++项目,执行以下代码 #include <iostream> using namespace std; int main() { cout ...
分类:编程语言   时间:2021-03-17 14:15:23    阅读次数:0
程序的修改!
一、 系统环境: Windows xp以上版本,电脑 二、 设计内容: 程序一共定义五个类,继承关系如图所示 首先我进行了主菜单主函数,会员登录,书记信息查看,购书。又在这些主菜单上进行相对应的子菜单的函数。主菜单如下: #include<string> #include<iostream> #in ...
分类:其他好文   时间:2021-03-16 14:02:51    阅读次数:0
[哥俩好数字] ADPC
1 #include <iostream> 2 using namespace std; 3 4 long long f(int x ) 5 { 6 long long tot = 0; 7 while(x) 8 { 9 tot += x % 10; 10 x /= 10; 11 } 12 retu ...
分类:其他好文   时间:2021-03-16 13:51:43    阅读次数:0
P1782 旅行商的背包
#include <cmath> #include <queue> #include <cstdio> #include <vector> #include <cstring> #include <iostream> #include <algorithm> #define int long lon ...
分类:其他好文   时间:2021-03-16 13:45:35    阅读次数:0
[POI2005]BAN-Bank Notes
#include <cmath> #include <queue> #include <cstdio> #include <vector> #include <cstring> #include <iostream> #include <algorithm> #define ll long long ...
分类:其他好文   时间:2021-03-16 13:45:15    阅读次数:0
DP —— 数字三角形模型
DP——数字三角形模型 0. 数字三角形 题目地址: 题目思路: 二维基础DP,每个 \(f[i,j]\) 都是从 \(f[i-1,j-1]\) 和 \(f[i-1,j]\) 转移过来,取 \(max\) ,最后循环最下层,取 \(max\) 即为答案 代码: #include<iostream> ...
分类:其他好文   时间:2021-03-16 11:57:25    阅读次数:0
[多校练习] 成都七中数据结构 Challenge 系列解题报告
Challenge 0 给一个长为 \(n\) 的数列,有 \(M\) 次操作 \((1\le n, m \le 10^5)\),每次操作是以下两种之一: 修改数列中的一个数 求数列中某位置的值 解答:数组模拟即可。 #include <iostream> #include <cstdio> #in ...
分类:其他好文   时间:2021-03-16 11:41:02    阅读次数:0
13291条   上一页 1 ... 11 12 13 14 15 ... 1330 下一页
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!