文章列表

筛选

振兴中华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……

梯度算利润

摘要:#include<stdio.h>void main(){ double a, sum = 0; float rate; scanf("%lf", &a); if (a > 1000000) { r……

输入确定数组长度

摘要:用 malloc库函数实现/* malloc example: random string generator*/#include <stdio.h>      /* printf, scanf, N……
精品文章

每日算法:快速排序

摘要:要求:手撕快排,用于个人复习。这玩意隔一段时间不写就容易出错,警钟长鸣。出错点:(1)返回值类型是 void ,可不可以是 vector<int> ?(2)如果是void,传入参数的 vector 就……

python数据类型

摘要:列表(list)def reverseWords(input):         # 通过空格将字符串分隔符,把各个单词分隔为列表    inputWords = input.split(" ")  ……

1147角谷猜想——C++

摘要:# include <iostream> using namespace std; int main() {      int n;      cin>>n;      while(n!=……
精品文章

STL之集合set

摘要:STL之集合一、set的概念       set 翻译为集合,是一个内部自动有序且不含重复元素的容器。set 最主要的作用就是自动去重并按升序排序,因此遇到需要去重但是又不方便直接开数组的情况。set……

C语言基础语法知识点

摘要:1. scanf()函数在输入变量的时候后面不要带有空格,否则控制台会出现卡住的现象,会影响格式化的输出。例如:scanf("%d ",&a);  不要这样写。2. scanf()函数和gets()函……
精品文章

C语言函数返回值类型举例介绍和数据类型介绍

摘要:C语言中函数返回值类型如下:1、void 空类型,表示该函数无返回值;2、int 整形,表示该函数返回int整形数值;3、double  双精度,函数返回双精度数值;4、char 字符串,函数返回字符……

火车出站 vector

摘要:#include<iostream> #include<string> #include<algorithm> #include<vector> #include<stack> using ……