直方图(C++)简单解 摘要:参考代码:#include <iostream>#include <vector>#include <algorithm>using namespace std;int main() { int…… 题解列表 2023年07月19日 0 点赞 2 评论 281 浏览 评分:9.9
最长平台(C++)简单又实用 摘要:参考代码:#include <iostream>#include <vector>using namespace std;int main() { int n; cin >> n; //…… 题解列表 2023年07月19日 0 点赞 1 评论 412 浏览 评分:9.0
整数去重(C++)简单又实用 摘要:解题思路:注意事项:参考代码:#include <iostream>#include <unordered_set>#include <vector>using namespace std;int m…… 题解列表 2023年07月19日 0 点赞 0 评论 773 浏览 评分:7.3
铺地毯(C++代码解析与题解) 摘要:代码解析在 main 函数中,首先读取一个整数 n,表示总共有 n 张地毯。然后,创建一个大小为 n 的 Carpet 数组 carpets,用于存储每个地毯的信息。通过一个循环,逐个输入每个地毯的坐…… 题解列表 2023年07月19日 0 点赞 0 评论 722 浏览 评分:9.0
杨辉三角(C++)简单易懂 摘要:参考代码:#include <iostream>using namespace std;int main() { int n; while (cin >> n) { // 使…… 题解列表 2023年07月19日 0 点赞 0 评论 548 浏览 评分:9.0
回文串(C++)简单易懂 摘要:参考代码:#include <iostream>#include <string>using namespace std;bool isPalindrome(string str) { int …… 题解列表 2023年07月19日 0 点赞 0 评论 430 浏览 评分:9.9
矩阵交换行(C++)简单实现 摘要:参考代码:#include <iostream>using namespace std;int main() { int matrix[5][5]; // 5x5矩阵 // 输入矩阵 …… 题解列表 2023年07月19日 0 点赞 0 评论 657 浏览 评分:9.9
同行列对角线的格子(C++代码解析与题解) 摘要:代码解析:在 main 函数中,我们首先输入三个整数 N、i 和 j,分别表示方格的大小和给定位置的行号和列号。然后,使用循环输出与给定位置同行的格子位置。遍历从 1 到 N 的每一列,输出格子位置 …… 题解列表 2023年07月19日 0 点赞 0 评论 776 浏览 评分:9.5
计算矩阵边缘元素之和(C++代码) 摘要:参考代码:#include <iostream>using namespace std;int main() { int m, n; cin >> m >> n; int matri…… 题解列表 2023年07月19日 0 点赞 0 评论 700 浏览 评分:8.4
石头剪刀布 摘要:解题思路:注意事项:参考代码:#include <bits/stdc++.h>using namespace std;int main(){ //比赛n轮,输入n ,小A的周期长度na,小B的周…… 题解列表 2023年07月18日 0 点赞 0 评论 323 浏览 评分:0.0