C语言基础语法知识点 摘要:1. scanf()函数在输入变量的时候后面不要带有空格,否则控制台会出现卡住的现象,会影响格式化的输出。例如:scanf("%d ",&a); 不要这样写。2. scanf()函数和gets()函…… 文章列表 2022年04月29日 1 点赞 0 评论 683 浏览 评分:10.0
精品文章 STL之集合set 摘要:STL之集合一、set的概念 set 翻译为集合,是一个内部自动有序且不含重复元素的容器。set 最主要的作用就是自动去重并按升序排序,因此遇到需要去重但是又不方便直接开数组的情况。set…… 文章列表 2022年04月28日 0 点赞 0 评论 414 浏览 评分:9.9
1147角谷猜想——C++ 摘要:# include <iostream> using namespace std; int main() { int n; cin>>n; while(n!=…… 文章列表 2022年04月20日 0 点赞 0 评论 625 浏览 评分:6.7
python数据类型 摘要:列表(list)def reverseWords(input): # 通过空格将字符串分隔符,把各个单词分隔为列表 inputWords = input.split(" ") …… 文章列表 2022年04月16日 0 点赞 0 评论 506 浏览 评分:9.9
精品文章 每日算法:快速排序 摘要:要求:手撕快排,用于个人复习。这玩意隔一段时间不写就容易出错,警钟长鸣。出错点:(1)返回值类型是 void ,可不可以是 vector<int> ?(2)如果是void,传入参数的 vector 就…… 文章列表 2022年04月12日 0 点赞 0 评论 390 浏览 评分:9.9
输入确定数组长度 摘要:用 malloc库函数实现/* malloc example: random string generator*/#include <stdio.h> /* printf, scanf, N…… 文章列表 2022年04月12日 0 点赞 0 评论 253 浏览 评分:0.0
梯度算利润 摘要:#include<stdio.h>void main(){ double a, sum = 0; float rate; scanf("%lf", &a); if (a > 1000000) { r…… 文章列表 2022年04月11日 0 点赞 0 评论 326 浏览 评分:0.0
振兴中华O。o 摘要:#include <bits/stdc++.h>using namespace std;int a[]={0,1};int b[]={1,0};int cnt;void dfs(int x,int y…… 文章列表 2022年04月09日 0 点赞 0 评论 289 浏览 评分:0.0
李白打酒O。o 摘要:#include <bits/stdc++.h>using namespace std;int sum = 0;void f(int dian, int hua, int jiu){ if(di…… 文章列表 2022年04月06日 0 点赞 0 评论 494 浏览 评分:2.0
学过线性代数的应该都知道矩阵加法是矩阵对应位数相加 摘要:学过线性代数的应该都知道矩阵加法是矩阵对应位数相加#include<iostream>#include<cstring>#include<algorithm>#include<string.h>#in…… 文章列表 2022年04月06日 0 点赞 0 评论 360 浏览 评分:0.0