上一页 1 ··· 7 8 9 10 11 12 13 14 15 16 下一页
摘要: #include <iostream> using namespace std; int main() { char a; char array[20]={NULL}; cin.get(array,20); cin.get(a); cout<<array<<" "<<(int)a<<endl; re 阅读全文
posted @ 2022-03-20 13:27 Dsad123FFFG6645 阅读(126) 评论(0) 推荐(0)
摘要: #include<iostream>#include<thread>using namespace std; void fun(int a[],int len){ for(int i =1;i<len;i++){ int temp =a[i]; int j = i-1; while(temp<a[j 阅读全文
posted @ 2022-03-19 22:21 Dsad123FFFG6645 阅读(19) 评论(0) 推荐(0)
摘要: #include<bits/stdc++.h> using namespace std; int num, count1,count2,sum; int temp = 0,temp1 = 0; int a[100],b[100]; int* p; void fun(int b[]) { for (i 阅读全文
posted @ 2022-03-19 12:47 Dsad123FFFG6645 阅读(41) 评论(0) 推荐(0)
摘要: #include<iostream> #include<vector> #include<string> using namespace std; string str; #define N 8 int j = 0; /* int main() { while (getline(cin, str)) 阅读全文
posted @ 2022-03-17 22:22 Dsad123FFFG6645 阅读(49) 评论(0) 推荐(0)
摘要: 题目正文编写一个程序输入一个m*n的矩阵存储并输出,并且求出每行的最大值和每行的总和。 要求把每行总和放入每行最大值的位置,如果有多个最大值,取下标值最小的那一个作为最大值。 最后将结果矩阵输出。 输入输入的第一行包括两个整数m和n(1<=m,n<=100),分别代表矩阵的行和列的维数。 接下来的m 阅读全文
posted @ 2022-03-16 16:52 Dsad123FFFG6645 阅读(125) 评论(0) 推荐(0)
摘要: #include<bits/stdc++.h>using namespace std;string Password(string str) { int len = str.size(); int a[4] = {0}; int count = 0; int num = 0;//重复子串对数 for 阅读全文
posted @ 2022-03-16 13:55 Dsad123FFFG6645 阅读(190) 评论(0) 推荐(0)
摘要: #include<iostream> // // Created by jt on 2020/8/22. // #include <vector> #include <queue> using namespace std; class BiNode { public: int data; BiNod 阅读全文
posted @ 2022-03-16 00:20 Dsad123FFFG6645 阅读(15) 评论(0) 推荐(0)
摘要: queue 操作 queue 和 stack 有一些成员函数相似,但在一些情况下,工作方式有些不同: front():返回 queue 中第一个元素的引用。如果 queue 是常量,就返回一个常引用;如果 queue 为空,返回值是未定义的。 back():返回 queue 中最后一个元素的引用。如 阅读全文
posted @ 2022-03-15 16:21 Dsad123FFFG6645 阅读(36) 评论(0) 推荐(0)
摘要: 迭代器类别 STL 标准库为每一种标准容器定义了一种迭代器类型,这意味着,不同容器的迭代器也不同,其功能强弱也有所不同。 容器的迭代器的功能强弱,决定了该容器是否支持 STL 中的某种算法。 常用的迭代器按功能强弱分为输入迭代器、输出迭代器、前向迭代器、双向迭代器、随机访问迭代器 5 种。本节主要介 阅读全文
posted @ 2022-03-15 14:48 Dsad123FFFG6645 阅读(58) 评论(0) 推荐(0)
摘要: //遍历 vector 容器。 #include <iostream> //需要引入 vector 头文件 #include <vector> using namespace std; int main() { vector<int> v{ 1,2,3,4,5,6,7,8,9,10 }; //v被初 阅读全文
posted @ 2022-03-15 14:44 Dsad123FFFG6645 阅读(16) 评论(0) 推荐(0)
上一页 1 ··· 7 8 9 10 11 12 13 14 15 16 下一页