E-COM-NET
首页
在线工具
Layui镜像站
SUI文档
联系我们
推荐频道
Java
PHP
C++
C
C#
Python
Ruby
go语言
Scala
Servlet
Vue
MySQL
NoSQL
Redis
CSS
Oracle
SQL Server
DB2
HBase
Http
HTML5
Spring
Ajax
Jquery
JavaScript
Json
XML
NodeJs
mybatis
Hibernate
算法
设计模式
shell
数据结构
大数据
JS
消息中间件
正则表达式
Tomcat
SQL
Nginx
Shiro
Maven
Linux
spaces
输入N,求N以内(包括N)的质数之和
具体代码如下:#includeusingname
spaces
td;intmain(){intN;cin>>N;intsum=0;for(intx=2;x<=N;x++){boolc=true;for(inti
夏短夜长
·
2023-11-24 17:22
C++语言的基础应用
c++
蓝桥杯
算法
迷宫问题(最短路径BFS)
每组输入的第一行是两个整数N和M(1#includeusingname
spaces
td;typedefpairp;intbook[100][100];charlu[100][100];intn,m;intbfs
放心笑
·
2023-11-24 17:21
2022CCPC桂林站部分题解
#includeusingname
spaces
td;intmain(){intn;strings;cin>>n;cin>>s;s=""+s+"";for(inti=1;iusingname
spaces
td
yaozizhi_yang
·
2023-11-24 17:21
算法
c++
数据结构
SDUT数据结构PTA专题(实验二)题解
程序设计综合实践1.47-6删除重复字符7-7约瑟夫环7-8一元多项式的乘法与加法运算7-9带头节点的双向循环链表操作7-10链表去重7-11单链表就地逆置7-1单链表的创建及遍历#includeusingname
spaces
td
彡倾灬染|
·
2023-11-24 17:46
PTA
题解
链表
数据结构
链表
算法
信息学奥赛2024题:【例4.10】末两位数
【输入样例】3【输出样例】88【提示】【数据范围】对于所有数据:nusingname
spaces
td;intmain(){intn;cin>>n;intnum=1,a=1992;for(inti=0;i
青小俊
·
2023-11-24 16:20
算法
算法
c++
C++ const说明
直接上代码#includeusingname
spaces
td;classA{public:intm1=1,m2=2;};intmain(){Aa,b;constAca;constA*p1=&a;//被指向的对象不能改变
来日梦多长
·
2023-11-24 16:47
C++
c++
开发语言
计算两个经纬度坐标点的距离C++
#include#include"math.h"usingname
spaces
td;#definepi3.1415926535897932384626433832795#defineEARTH_RADIUS6378.137
正则化
·
2023-11-24 16:58
栈实现对称括号判断(c++)
#include#includeusingname
spaces
td;intmain(){charc[100],c1[100],top=-1;cin>>c;for(inti=0;i
ChenWenKen
·
2023-11-24 16:53
逻辑练习
c++
算法
开发语言
C++栈(数组/链表实现)
数组实现栈:#include#include#includeusingname
spaces
td;intindex=-1;intmSize=100;intarrStack[100];voidclear()
ChenWenKen
·
2023-11-24 16:23
逻辑练习
c++
链表
数据结构
栈实现十进制转八进制(c++)
#include#includeusingname
spaces
td;intmain(){intarr[100],index=-1,num;cin>>num;while(num!
ChenWenKen
·
2023-11-24 16:23
逻辑练习
c++
算法
数据结构
代码随想录算法训练营第四十四天【动态规划part06】 | 完全背包、518. 零钱兑换 II、377. 组合总和 Ⅳ
题目链接:题目页面求解思路:完全背包和01背包的唯一不同就是在遍历顺序上;完全背包先遍历背包或是物品都可以,并且需要正序遍历代码:#include#includeusingname
spaces
td
Mako5455
·
2023-11-24 16:46
算法训练
算法
动态规划
根据经纬度计算两点之间的距离、点到直线的距离
#include#includeusingname
spaces
td;#de
D117zq
·
2023-11-24 16:45
导航
c++
代码随想录算法训练营第四十五天【动态规划part07】 | 70. 爬楼梯 (进阶)、322. 零钱兑换、279.完全平方数
=dp[i-j];dp数组的初始化:dp[0]=1;确定遍历顺序:排列问题,先遍历物品,再遍历背包;完全背包,遍历顺序都为正序举例推导dp数组:代码:#include#includeusingname
spaces
td
Mako5455
·
2023-11-24 16:41
算法训练
算法
动态规划
C++学习笔记(10)运算符重载,友元函数,友元类
允许我们为运算符定义专门的函数,这被称为运算符重载:运算符可以简化字符串的操作,‘+’,以及使用关系运算符比较字符串,[]运算符访问向量中的元素;例如:#include#include#includeusingname
spaces
td
Alpha205
·
2023-11-24 14:39
c++
【C++】友元函数
当我们随便写一个日期类,去实现输入输出流重载时:#includeusingname
spaces
td;classDate{public:Date(intyear,intmonth,intday):_year
zhao111222333444
·
2023-11-24 14:09
c++
c++
封装
【C++】-- 友元
内部类定义2.内部类特性五、总结一、为什么要使用友元对于自定义类型Date类,为了打印Date类的对象,需要我们自己在Date类中写打印函数:voidPrint()const{coutusingname
spaces
td
玲娜贝儿~
·
2023-11-24 14:30
C++
开发语言
C++ vector容器的练习大全(增删查改,获取,长度,指定元素,交换,拷贝,插入,预留空间,容量是否为空,自定义等等)
#include#include#includeusingname
spaces
td;voidfun01(){//vectorvec;//vectorvec(5,4);intnums[]={1,2,3,4,5,6
ZHANGα
·
2023-11-24 14:28
c++
c++
开发语言
c++day7 this指针
其实也就是obj1.setXY(10,15);obj1.setXY(10,15,&obj1);//有一个默认的指针(引用)指向当前的对象,用this也可以区分实名的形参和实参#includeusingname
spaces
td
a_saltedfish_dream
·
2023-11-24 14:27
c++基础
c++
C++ Day04 this指针,友元函数,重载
示例#include#includeusingname
spaces
td;classStu{private:charname[50];charsex[10];intage;public:Stu(){}Stu
ZHANGα
·
2023-11-24 14:25
c++
c++
开发语言
c语言指针算术运算,C语言指针用法详解(二) 指针的算术运算
例题1:Question:chara[20];int*ptr=(int*)a;ptr++Practice:Reason:#includeusingname
spaces
td;intmain(){chara
森纳映画
·
2023-11-24 14:49
c语言指针算术运算
1025 反转链表 (25分)
#include#includeusingname
spaces
td;intmain(){intfrist,n,k,temp;intdata[100005],next[100005],list[100005
我真的想上大学
·
2023-11-24 14:09
求阶乘
#includeusingname
spaces
td;intjiecheng(inta){if(a==0)return1;elseif(a==1||a==2)returna;elsereturn(a*jiecheng
瓜大小王子
·
2023-11-24 13:06
最强TTS(文本转语音)模型Bark发布 - 支持带有情感的语音,歌曲生成 -体验声音克隆功能
ElevenLabsSunoBark(TTS模型)Githublink:https://github.com/suno-ai/bark
Spaces
:https://huggingface.co/
spaces
没错我就是张老师
·
2023-11-24 12:10
人工智能
c语言读文件fscanf,C语言文件读写命令fprintf和fscanf
#include#includeusingname
spaces
td;intmain(){intarray[13][13],i,j;FILE*fp=fopen("result.txt","w");if(!
Gaosaroma
·
2023-11-24 12:21
c语言读文件fscanf
用函数对象表示策略
例如C语言库函数中的qsort函数,通过传递不同的比较器函数,就可以获得各种不同的排列顺序,这正是策略模式的一个例子#include#includeusingname
spaces
td;intcompare
没走过的二丁目
·
2023-11-24 12:50
数据结构(C++) - 实现二叉树链式存储结构
#pragmaonce#includeusingname
spaces
td;templatestructBinTreeNode{DataTypedata;BinTreeNode*lChild;BinTreeNode
KT99
·
2023-11-24 11:11
数据结构
基于顺序存储结构的图书信息表的新图书的入库
#include#includeusingname
spaces
td;#defineOK1#defineERROR0#defineOVERFLOW-2typedefintStatus;//声明类型int类型为
点一下我的id
·
2023-11-24 11:10
1066 Root of AVL Tree (25)(25 分)
二叉树旋转操作,这个只能记一下怎么旋转了#include#includeusingname
spaces
td;intn;structnode{intdata;node*lchild,*rchild;};node
DaiMorph
·
2023-11-24 10:36
c++ 栈的数组实现
/*栈的数组实现*/#includeusingname
spaces
td;#defineMAXSIZE10;templateclassStack{public://默认构造函数Stack();Stack(
typistw
·
2023-11-24 10:26
c++学习笔记
c++
栈
数组
【MISRA C 2012】Rule 5.2 在同一作用域和名称空间中声明的标识符应该是不同的
1.规则1.1原文1.2分类2.关键描述3.代码实例1.规则1.1原文Rule5.2Identifiersdeclaredinthesamescopeandname
spaces
hallbedistinctCategoryRequiredAnalysisDecidable
yy九歌
·
2023-11-24 09:23
MISRA
C
2012
规则系列归纳分析
c语言
开发语言
C&C++输入输出流介绍
进行数据的读取和输出文件输入输出流可以通过使用ifstream和ofstream对文件进行读写操作内存数据流可以通过使用stringstream对字符串进行读写操作应用举例标准输入输出流:#includeusingname
spaces
td
匠心码农
·
2023-11-24 08:18
C/C++
c语言
c++
开发语言
公路修建
求大神指点啊#include#include#include#includeusingname
spaces
td;intf[9999];doubledx[9999],dy[9999];doubledis[
HT008_123
·
2023-11-24 08:37
题目分析
使用Windows GDI 截取图片
#include#include#include#include#include#include#includeusingname
spaces
td;intmain(){try{intnScreenWidth
bosaidongmomo
·
2023-11-24 08:34
cpp
windows
c++
算法
2022年9月青少年C/C++软件编程(二级)等级考试试卷及答案解析
时间限制:5000内存限制:65536输入输入包含三行:第一行为N,表示整数序列的长度(Nusingname
spaces
td;intmain(){#ifdefLOCALfreopen("1.in","r
青少年等级考试周老师
·
2023-11-24 07:03
#
C/C++(1-2)级试题合集
c++
c语言
开发语言
第十一届蓝桥杯省赛第一场C++组真题(编程题)
数据范围1≤n≤10^18输入样例:20输出样例:2010521AC代码:#includeusingname
spaces
td;typedeflonglongll;intmai
21RGHLY
·
2023-11-24 07:56
蓝桥杯
蓝桥杯
C语言判断一个数是否为回文素数,判断一个数是否为回文素数
*作者:刘明亮*完成日期:2012年11月19日*版本号:v1.0*输入描述:回文素数*问题描述:略*程序输出:略*问题分析:略*算法设计:略*/#includeusingname
spaces
td;#include
随缘猪
·
2023-11-24 06:27
C语言判断一个数是否为回文素数
最长单调上升子序列问题
请问下面两段代码的区别是什么#includeusingname
spaces
td;constintN=1e5+5;inta[N],x,n,m;intg[N],cnt;intmain(){cin>>m;while
亖嘁
·
2023-11-24 05:33
尚待解决的问题
c++
算法
数据结构
广义表求深度
输入样例((a,b,(c,(d,e),f)),g)输出样例44#include#include#includeusingname
spaces
td;typedefenum{ATOM,L
axiqia
·
2023-11-24 05:29
数据结构与算法
字符串取出多余空格的三种方法
classremovespace1{public:voidremoveExtra
Spaces
(string&s){//删除中间多余空格for(
Tian Meng
·
2023-11-24 04:39
数据结构刷题
c++
算法
数据结构
C++ 数据类型
显然数据类型的存在意义是给变量分配合适的内存空间整型在C++里面,我们这样声明整型变量#includeusingname
spaces
td;intmain(){#长整型shortnum1=10;#整型intnum2
小潤澤
·
2023-11-24 04:41
C++学习笔记(Day1-2)
学习网址Day1头文件#include命名空间:usingname
spaces
td/std::cout输入输出:cin>>>>endl;cout类:私有属性intlength;公有属性构造函数car()
Seasonboboo
·
2023-11-24 03:25
c++
算法
C++每日选择题—Day1
#includeusingname
spaces
td;classA{public:A(){}~A(){}private:staticinta;};intmain(){coutclassB{};Bfunc(
小程序面包园
·
2023-11-24 03:50
C++每日五道选择题
c++
算法
开发语言
c++ 基础(类)
1.c++类的简单使用#include#include#includeusingname
spaces
td;classPerson{public:Person(inth,inta):height(h),age
访风景于崇阿
·
2023-11-24 03:39
c++
c++
算法
开发语言
c++ 谓词
1.一元谓词#include#include#includeusingname
spaces
td;classCreaterFive{public:booloperator()(intval){returnval
访风景于崇阿
·
2023-11-24 03:38
c++
c++
C++ 标准模板库:容器
1.list容器1.1初始化,获取读取#include#includeusingname
spaces
td;voidprintList(constlist&L){for(list::const_iteratorit
访风景于崇阿
·
2023-11-24 03:08
c++
c++
开发语言
最佳实践:解决 Swagger API 中的未授权访问漏洞
题解|#比较字符串大小##includeusingname
spaces
td;intmystrcmp(constchar*src,const题解|#查找组成一个偶数最接近的两个素数##include#includeusingname
spaces
td
2301_79125642
·
2023-11-24 03:03
java
poj 2007 Scrambled Polygon [极角排序]
Code:#include#include#include#includeusingname
spaces
td;constintN=55;s
creat2012
·
2023-11-24 03:27
poj
2007
Scrambled
Polygon
极角排序
Scrambled Polygon POJ - 2007(极角排序)
将排序后输出就行,注意输入不定1//2//CreatedbyHJYLon2020/1/17.3//4#include5#include6#include7#include8#include9usingname
spaces
td
_Vampire.
·
2023-11-24 03:56
算法
c++
数据结构
开发语言
HDU-2007 Scrambled Polygon 极角排序
#include#include#includeusingname
spaces
td;constintmaxn=55;intn,r;structPoint{doublex,y;Point(doublex=
___Evan
·
2023-11-24 03:56
菜鸟初学几何
【POJ2007】Scrambled Polygon【极角排序】
linklinklink分析:极角排序原点就是(0,0)(0,0)(0,0)CODE:#include#include#include#include#include#defineregregisterusingname
spaces
td
Ayane.
·
2023-11-24 03:52
计算几何
计算几何
叉积
上一页
124
125
126
127
128
129
130
131
下一页
按字母分类:
A
B
C
D
E
F
G
H
I
J
K
L
M
N
O
P
Q
R
S
T
U
V
W
X
Y
Z
其他