码迷,mamicode.com
首页 >  
搜索关键字:std    ( 41627个结果
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
PAT(乙级)2021年春季考试
比赛链接:https://pintia.cn/market/item/1371703238093053952 7-1 打印三角形拼图 (15 分) 题解 找规律。 代码 #include <bits/stdc++.h> using namespace std; int main() { ios::s ...
分类:其他好文   时间:2021-03-17 15:03:51    阅读次数:0
C++ 关于 freopen 函数
C++ 关于 freopen 函数 名 称:freopen 所 属:stdio.h 功 能:用于重定向输入输出流。该函数可以在不改变代码原貌的情况下改变输入输出环境,但使用时应当保证流是可靠的。 实例 #include <bits/stdc++.h> using namespace std; int ...
分类:编程语言   时间:2021-03-17 14:47:39    阅读次数: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
[哥俩好数字] 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
c语言中程序的循环控制(while循环,输入一个整数,输入从它开始到0的所有整数)
c语言中程序的循环控制,(while循环) 1、 #include <stdio.h> int main(void) { int i; puts("please input an integer!"); printf("i = "); scanf("%d", &i); while (i >= 0) ...
分类:编程语言   时间:2021-03-16 13:47:40    阅读次数:0
素数判定 - 哈尔滨工业大学
题目描述 Time Limit: 1000 ms Memory Limit: 256 mb 给定一个数n,要求判断其是否为素数(0,1,负数都是非素数)。 输入输出格式 输入描述: 测试数据有多组,每组输入一个数n。 输出描述: 对于每组输入,若是素数则输出yes,否则输入no。 输入输出样例 输入 ...
分类:其他好文   时间:2021-03-16 13:20:31    阅读次数:0
pipioj 1023: 巨人排队(贪心)
http://www.pipioj.online/problem.php?id=1023 每次把当前的放在能排的当中最矮的一队里就ok 1 #define IO std::ios::sync_with_stdio(0); 2 #define bug(x) cout<<#x<<" is "<<x<<e ...
分类:其他好文   时间:2021-03-15 11:32:55    阅读次数:0
Northern Eurasia Finals Online 2020 L - Lookup Performance
处理了一年的边界问题 #include <bits/stdc++.h> using namespace std; const int N = 2e5 + 10; #define fi first #define se second #define sz(v) ((int)(v).size()) #d ...
分类:其他好文   时间:2021-03-15 11:18:36    阅读次数:0
41627条   上一页 1 ... 25 26 27 28 29 ... 4163 下一页
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!