计算(a+b)*c的值题解 摘要:解题思路:括号内先算再乘注意事项:注意三个变量输入的顺序和计算的顺序参考代码:#include<iostream>using namespace std;int main(){ long lon…… 题解列表 2023年04月06日 0 点赞 0 评论 1026 浏览 评分:10.0
蓝桥杯基础练习VIP-报时助手(C语言) 摘要:解题思路:注意事项:参考代码:#include <stdio.h>#include <string.h>//二十以内的数字;char arr[25][20]={"zero","one","two","…… 题解列表 2023年04月16日 1 点赞 0 评论 497 浏览 评分:10.0
2864: 单词替换 解题思路:1.读入一行字符串s、待替换单词a和替换单词b。2.使用stringstream将字符串s分割成单词,并依次判断每个单词是否为待替换单词a,若是,则输出替换单词b;否则输出原单词。3.输出替换后的字符串。注意事项:参考代码:#include#include 题解列表 2023年04月21日 0 点赞 0 评论 704 浏览 评分:10.0 屎山代码写法 摘要:解题思路:注意事项:参考代码:#include <iostream>#include <cstdio>#include <cstring>#include <algorithm>using names…… 题解列表 2023年04月26日 0 点赞 0 评论 678 浏览 评分:10.0 破解简单密码(switch暴力破解) ```c#include#includevoidDecode(char*strs);chartranslate(charch);intmain(){charpassword[100]={0};while(~scanf("%s",password)){getchar();Decode(password) 题解列表 2023年05月03日 0 点赞 0 评论 612 浏览 评分:10.0 [编程入门]输出九九乘法表2 摘要:一、解题思路:C参考代码:#include <stdio.h> int main() { printf(" Nine-by-nine Multiplication Table\n"); …… 题解列表 2023年05月06日 0 点赞 0 评论 689 浏览 评分:10.0 LIS二分优化 + 倒序输出方案 (C++) ##思路找出一个子序列,并且是严格从小到大的子序列,结果需要尽可能的大,其实就是最长上升子序列的另外一种说法,读到这里题目就可以开始分析了。从数据范围可以知道,最多有1e6个单词,用普通的n^2写法只能拿到70%的分数,显然,要拿到全部的分数, 题解列表 2023年05月09日 1 点赞 0 评论 791 浏览 评分:10.0 #C++1190—— 剔除相关数(map) 摘要:解题思路:对输入字符数字num进行排序,判断是否为相关数,记得保留原来的字符数字顺序,此处用tp保存,然后输出;注意事项:此题为多组输入,记得清空统计变量,恢复初始状态,对 string 类保存的数字…… 题解列表 2023年05月12日 1 点赞 0 评论 600 浏览 评分:10.0 Big Bang(一般解法) 摘要:解题思路:注意事项:参考代码:#include<stdio.h>#include<string.h>#include<stdlib.h>typedef struct Node{ char a[32];…… 题解列表 2023年05月24日 0 点赞 0 评论 573 浏览 评分:10.0 优质题解 逆序数的问题 摘要:## 假如这个题换一种说法,n个人如果是线性排列,要使123456…n变成n…654321, 那么需要的时间总数就是(n-1)+…+5+4+3+2+1=n*(n-1)/2;即1右移n-1步, …… 题解列表 2023年05月28日 1 点赞 1 评论 1030 浏览 评分:10.0 « 12...13141516171819...59115912 »
屎山代码写法 摘要:解题思路:注意事项:参考代码:#include <iostream>#include <cstdio>#include <cstring>#include <algorithm>using names…… 题解列表 2023年04月26日 0 点赞 0 评论 678 浏览 评分:10.0
破解简单密码(switch暴力破解) ```c#include#includevoidDecode(char*strs);chartranslate(charch);intmain(){charpassword[100]={0};while(~scanf("%s",password)){getchar();Decode(password) 题解列表 2023年05月03日 0 点赞 0 评论 612 浏览 评分:10.0
[编程入门]输出九九乘法表2 摘要:一、解题思路:C参考代码:#include <stdio.h> int main() { printf(" Nine-by-nine Multiplication Table\n"); …… 题解列表 2023年05月06日 0 点赞 0 评论 689 浏览 评分:10.0
LIS二分优化 + 倒序输出方案 (C++) ##思路找出一个子序列,并且是严格从小到大的子序列,结果需要尽可能的大,其实就是最长上升子序列的另外一种说法,读到这里题目就可以开始分析了。从数据范围可以知道,最多有1e6个单词,用普通的n^2写法只能拿到70%的分数,显然,要拿到全部的分数, 题解列表 2023年05月09日 1 点赞 0 评论 791 浏览 评分:10.0
#C++1190—— 剔除相关数(map) 摘要:解题思路:对输入字符数字num进行排序,判断是否为相关数,记得保留原来的字符数字顺序,此处用tp保存,然后输出;注意事项:此题为多组输入,记得清空统计变量,恢复初始状态,对 string 类保存的数字…… 题解列表 2023年05月12日 1 点赞 0 评论 600 浏览 评分:10.0
Big Bang(一般解法) 摘要:解题思路:注意事项:参考代码:#include<stdio.h>#include<string.h>#include<stdlib.h>typedef struct Node{ char a[32];…… 题解列表 2023年05月24日 0 点赞 0 评论 573 浏览 评分:10.0
优质题解 逆序数的问题 摘要:## 假如这个题换一种说法,n个人如果是线性排列,要使123456…n变成n…654321, 那么需要的时间总数就是(n-1)+…+5+4+3+2+1=n*(n-1)/2;即1右移n-1步, …… 题解列表 2023年05月28日 1 点赞 1 评论 1030 浏览 评分:10.0