刷题记录2025/11/26 2773:计算线段长度 解题思路:注意事项:注意绝对值,注意保留三位小数参考代码:#include#includeintmain(){doubleXa,Ya,Xb,Yb;doublea,b,c;scanf("%lf%lf",&Xa, 题解列表 2025年11月26日 3 点赞 0 评论 424 浏览 评分:10.0
最长上升序列(动态规划) 摘要:解题思路:注意事项:参考代码:#include<stdio.h>int max(int a,int b){ int max=(a>b) ? a : b;&n…… 题解列表 2025年11月26日 0 点赞 0 评论 215 浏览 评分:0.0
最长上升子序列 摘要:#include<stdio.h>int max(int a,int b){ if(a>=b) return a; &…… 题解列表 2025年11月26日 0 点赞 0 评论 238 浏览 评分:0.0
蓝桥杯2025图形 解题思路:注意事项:参考代码:#include#includeintmain(){inth,w;scanf("%d%d",&h,&w);charbase[]="2025";intbase_len=strlen(base);charrepeated_base[100 题解列表 2025年11月26日 0 点赞 0 评论 2118 浏览 评分:0.0
1004:母牛的故事 解题思路:前3年:每年新增1头小牛,总数为年份数(f(1)=1,f(2)=2,f(3)=3)。第4年起:每只3岁及以上的母牛每年产1头小牛,新增数量等于3年前的母牛总数(f(n-3)),叠加到前一年总数(f(n-1))注意事项:参考代码:intmain(){intcow(intn);intyea 题解列表 2025年11月25日 11 点赞 0 评论 2342 浏览 评分:10.0
1031字符串反转 摘要:解题思路:注意事项:参考代码:#include"stdio.h"#include"string.h"int main(){ char …… 题解列表 2025年11月25日 1 点赞 1 评论 1678 浏览 评分:7.3
1044:字符串排序 解题思路:使用冒泡排序注意事项:由于输入为字符串,因此采用char字符,同时无法直接使用比较符号,因此引入string函数,在比较上采用stringcompare参考代码:#include"stdio.h"#include"string.h"intmain(){charnum1[10000], 题解列表 2025年11月25日 0 点赞 0 评论 1478 浏览 评分:10.0
2908简单方法 #include#include#include#include#includeusingnamespacestd;intmain(){intn;cin>>n;vectora(n);doubles 题解列表 2025年11月24日 0 点赞 0 评论 1253 浏览 评分:0.0
画矩形,仅限于参考,我不是大佬 摘要:解题思路:先把开头打了,再想怎么打空格,然后再用开头的方法注意事项:应该没有参考代码:import java.util.Scanner;public class Main {  …… 题解列表 2025年11月24日 0 点赞 0 评论 1239 浏览 评分:0.0
使用%o直接输出八进制数 解题思路:在c语言里%o能直接输出八进制数注意事项:需要注意题目没有说明输入数的数目,在while循环中以EOF作为文件结束标志参考代码:#includeintmain(){intnum;while(scanf("%d",&num)!=EOF){printf("%o\n", 题解列表 2025年11月24日 0 点赞 0 评论 1277 浏览 评分:0.0