网站首页 站内搜索

搜索结果

查询Tags标签: cout,共有 1241条记录
  • C++ 提高教程 STL Vector互换容器

    # include<iostream> #include<vector> # include<algorithm> # include<string> using namespace std;void printVector(vector<int>& v) {for (vector<int>::iterator it = v.begin(); it != v.end(); it++){cout << *it…

    2021/10/13 11:14:15 人评论 次浏览
  • C++序列与关联容器

    容器概述#include <iostream> #include <vector>int main() {std::vector<int> x{1,2,3};auto b = x.begin(); // auto b = x.rbegin() 反向遍历auto e = x.end(); //auto e = x.rend()for(auto ptr = b; ptr < e; ++ptr){std::cout << *ptr &…

    2021/10/11 20:14:35 人评论 次浏览
  • C++序列与关联容器

    容器概述#include <iostream> #include <vector>int main() {std::vector<int> x{1,2,3};auto b = x.begin(); // auto b = x.rbegin() 反向遍历auto e = x.end(); //auto e = x.rend()for(auto ptr = b; ptr < e; ++ptr){std::cout << *ptr &…

    2021/10/11 20:14:35 人评论 次浏览
  • 2021CCPC网络赛(重赛)——1005.E.Monopoly

    #include<bits/stdc++.h> #define ll long long #define fir first #define sec second #define PB push_back #define ALL(a) begin(a),end(a) #define mem(a,n) memset(a,n,sizeof(a)) #define IOS ios::sync_with_stdio(false);cin.tie(0);cout.tie(0); using na…

    2021/10/10 23:49:38 人评论 次浏览
  • 2021CCPC网络赛(重赛)——1005.E.Monopoly

    #include<bits/stdc++.h> #define ll long long #define fir first #define sec second #define PB push_back #define ALL(a) begin(a),end(a) #define mem(a,n) memset(a,n,sizeof(a)) #define IOS ios::sync_with_stdio(false);cin.tie(0);cout.tie(0); using na…

    2021/10/10 23:49:38 人评论 次浏览
  • c++面向对象的方式打开线性方程组求解:Jacobi与Gausss-Seidel迭代法、高斯消元法

    学校课程要求 当然上述代码各大网站已经漫天飞了,随便搜几个回来自己整合一下轻松就完成了,放几个我参考的文章:雅各比迭代法: https://blog.csdn.net/xiaowei_cqu/article/details/8585703 Gausss-Seidel迭代法: https://blog.csdn.net/qq_27508477/article/details…

    2021/10/10 20:14:12 人评论 次浏览
  • c++面向对象的方式打开线性方程组求解:Jacobi与Gausss-Seidel迭代法、高斯消元法

    学校课程要求 当然上述代码各大网站已经漫天飞了,随便搜几个回来自己整合一下轻松就完成了,放几个我参考的文章:雅各比迭代法: https://blog.csdn.net/xiaowei_cqu/article/details/8585703 Gausss-Seidel迭代法: https://blog.csdn.net/qq_27508477/article/details…

    2021/10/10 20:14:12 人评论 次浏览
  • C++排序算法之选择排序

    //Author:Pan Daoxi #include <iostream> using namespace std; int main(){int n,k,a[1001];cin>>n;for(int i=0;i<n;i++){cin>>a[i];}for(int i=0;i<n;i++){k=i; // 每次把i的值给k,保留下标 for(int j=i+1;j<n;j++){ // 从下一个开始比较 …

    2021/10/10 17:17:32 人评论 次浏览
  • C++排序算法之选择排序

    //Author:Pan Daoxi #include <iostream> using namespace std; int main(){int n,k,a[1001];cin>>n;for(int i=0;i<n;i++){cin>>a[i];}for(int i=0;i<n;i++){k=i; // 每次把i的值给k,保留下标 for(int j=i+1;j<n;j++){ // 从下一个开始比较 …

    2021/10/10 17:17:32 人评论 次浏览
  • 插入排序(含动画演示)——C++

    算法思想 插入排序,即将数列中无序的元素插入到数列中已排序数列的适当位置, 最终形成完全有序数列。 学习插入算法,我们应先了解原理如何,先上动画图解进行演示具体代码如下: #include <iostream> using namespace std;void dengzilin(int *a,int len) //den…

    2021/10/10 17:17:27 人评论 次浏览
  • 插入排序(含动画演示)——C++

    算法思想 插入排序,即将数列中无序的元素插入到数列中已排序数列的适当位置, 最终形成完全有序数列。 学习插入算法,我们应先了解原理如何,先上动画图解进行演示具体代码如下: #include <iostream> using namespace std;void dengzilin(int *a,int len) //den…

    2021/10/10 17:17:27 人评论 次浏览
  • 通过函数实现几个数中最大的一个

    #include<iostream>using namespace std; int main(){ int max(int a,int b ,int c,int d); int x,y,z,w,t; cout<<"please input numbers:"; cin>>x>>y>>z>>w; t=max(x,y,z,w); cout<<"最大值为:"…

    2021/10/7 23:40:43 人评论 次浏览
  • 通过函数实现几个数中最大的一个

    #include<iostream>using namespace std; int main(){ int max(int a,int b ,int c,int d); int x,y,z,w,t; cout<<"please input numbers:"; cin>>x>>y>>z>>w; t=max(x,y,z,w); cout<<"最大值为:"…

    2021/10/7 23:40:43 人评论 次浏览
  • 700题复习计划

    review AT193 将n个数从小到大排序,挨个输出 #include<cstdio> #include<iostream> #include<algorithm> #include<cstring> using namespace std; string a[105]; int n,m; bool cmp(string x,string y){return x+y>y+x; } int main(){scanf…

    2021/10/7 23:15:41 人评论 次浏览
  • 700题复习计划

    review AT193 将n个数从小到大排序,挨个输出 #include<cstdio> #include<iostream> #include<algorithm> #include<cstring> using namespace std; string a[105]; int n,m; bool cmp(string x,string y){return x+y>y+x; } int main(){scanf…

    2021/10/7 23:15:41 人评论 次浏览
扫一扫关注最新编程教程