Java信息学奥赛一本通T1317-组合的输出 摘要:注意输出格式化 import java.util.ArrayList; import java.util.LinkedList; import java.util.List; im…… 题解列表 2023年03月23日 0 点赞 0 评论 724 浏览 评分:8.4
题解 1575: 递归倒置字符数组----自用 摘要:解题思路:非递归方法注意事项:参考代码:#include<stdio.h> int main() { int n; char temp; char a[100]; …… 题解列表 2023年04月02日 0 点赞 0 评论 842 浏览 评分:8.4
蓝桥杯2022年第十三届省赛真题-纸张尺寸 摘要:解题思路:注意事项:参考代码:a=input()k=int(a[1])long=1189width=841temp=0i=0while(i!=k): long=long//2 if wid…… 题解列表 2023年04月06日 0 点赞 0 评论 1015 浏览 评分:8.4
并查集与路径压缩 摘要:利用并查集的路径压缩,快速找到最左和最右的可用节点 ```cpp #include using namespace std; #define pr pair #define ll long …… 题解列表 2023年04月10日 0 点赞 1 评论 652 浏览 评分:8.4
输入输出练习之输出图案 摘要:不喜勿喷,谢谢各位参考代码:#includeusing namespace std;int main(){ char a; cin>>a; cout<<" "<<a<<endl; …… 题解列表 2023年04月15日 0 点赞 0 评论 735 浏览 评分:8.4
遍历所有区间可能,找到第一个不同 摘要:解题思路:遍历所有区间可能,如果起点和终点相同,那么就各自向中间移动一位,直到第一位不同。然后比较这一位,前大后小则ans++注意事项:参考代码:#include <bits/stdc++.h> #…… 题解列表 2023年04月15日 0 点赞 1 评论 1488 浏览 评分:8.4
优质题解 过滤多余的空格(C++代码解析和题解) 摘要:代码解析:在 main 函数中,首先声明一个字符串变量 sentence,用于存储输入的整行句子。使用 getline(cin, sentence) 函数读取一行用户输入,并将其存储在 sentenc…… 题解列表 2023年07月17日 2 点赞 0 评论 1752 浏览 评分:8.4
计算矩阵边缘元素之和(C++代码) 摘要:参考代码:#include <iostream>using namespace std;int main() { int m, n; cin >> m >> n; int matri…… 题解列表 2023年07月19日 0 点赞 0 评论 823 浏览 评分:8.4
优质题解 杨辉三角(c++代码) 摘要:杨辉三角(在这里储存为直角正三角形) > 1 > 1 1 > 1 **2 1** > 1 3 **3** 1 > …… 看到这张图应该先想一下打印直角正三角形的代码 ```cpp …… 题解列表 2023年07月19日 0 点赞 5 评论 626 浏览 评分:8.4
2839: 石头剪刀布 摘要:解题思路:注意事项:i%na,i%nb参考代码: #include <iostream> using namespace std; int n,na,nb,a=0,b=0,A[100…… 题解列表 2023年07月19日 0 点赞 0 评论 308 浏览 评分:8.4