二分查找-主函数,自定义函数。 摘要:# 二分查找 即对于一个有序的一维数组,查找数组中某一个元素的方法。 本部分分为两部分; 1.主函数的二分查找; )1定义一个数组arr[]={0,1,2,3,4,5,6,7,8,9}…… 文章列表 2022年10月29日 0 点赞 0 评论 176 浏览 评分:9.9
字符串常用输入方法(C++) 摘要:(1)cin>>char s[20]; cin>>s;遇到空格,tab,回车都会结束(2)cin.get()char ch; ch=cin.get(); cin.get(); //可以用来吃…… 文章列表 2022年10月31日 0 点赞 0 评论 185 浏览 评分:9.9
算法图解 分享 摘要:#####本书示例丰富,图文并茂,以让人容易理解的方式阐释了算法,旨在帮助程序员在日常项目中更好地发挥算法的能量。书中的前三章将帮助你打下基础,带你学习二分查找、大O表示法、两种基本的数据结构以及递归…… 文章列表 2022年11月03日 0 点赞 0 评论 196 浏览 评分:9.9
不使用string.h头文件计算字符长度 摘要:#include<stdio.h> #include<math.h> int main(void) { int num, count=0; scanf_s("%d", &num); …… 文章列表 2022年11月03日 0 点赞 0 评论 138 浏览 评分:9.9
用math.h处理立方运算 摘要:#include<stdio.h> #include<math.h> int main(void) { int number, a, b, c; for (number = 100; …… 文章列表 2022年11月05日 0 点赞 0 评论 141 浏览 评分:8.0
幸运儿的单链表算法 摘要:#include<stdio.h>#include<malloc.h>#define MAX 50typedef struct test { struct test* next; int …… 文章列表 2022年11月06日 0 点赞 0 评论 293 浏览 评分:9.9
大数斐波那契数列 摘要:原题为洛谷p2437利用string的加法特性f[i]=f[i-1]+f[i-2]#include<bits/stdc++.h> using namespace std; string fb[10…… 文章列表 2022年11月12日 0 点赞 0 评论 188 浏览 评分:9.9
cs小白第一个博客? 摘要:作为一名刚上大一的cs学生,在上大学前从未接触过编程。说到这里还是有点小小的遗憾,因为高中勇气不足没能尝试学信竞。不过没有关系,现在完全不算晚,我也不必看着他人的样子而隐隐担忧,走出自己的节奏就好。在…… 文章列表 2022年11月13日 0 点赞 0 评论 178 浏览 评分:0.0
题目 1042: [编程入门]电报加密 摘要:#include <stdio.h>#include <string.h>void fun(char a[]){ for (int i = 0; i < strlen(a); i++) …… 文章列表 2022年11月13日 0 点赞 0 评论 147 浏览 评分:0.0
1303基础解法不适用(Python) 摘要:num = int(input())dic = {}for i in range(num) : str_ = input() dic[str_] = dic.get(str_, 0) + …… 文章列表 2022年11月14日 0 点赞 0 评论 118 浏览 评分:0.0