使用gets不能使用fgets,原因:笔者认为第二个测试用例太长了,超过了一行,因此使用gets无限制读取,直到读到空格和回撤符号 摘要:#include<stdio.h>#include<string.h>#include<stdlib.h>int compare(const void *p1,co…… 题解列表 2025年09月08日 0 点赞 0 评论 111 浏览 评分:0.0
1123-列出最简真分数列表 摘要:代码:#include int main() { for (int i = 0; i …… 题解列表 2025年09月09日 0 点赞 0 评论 130 浏览 评分:0.0
利用vector定义数组大小,static_cast显式转换 摘要:解题思路:注意事项:参考代码:#include <iostream>using namespace std;#include <vector>int main(){ int n…… 题解列表 2025年09月10日 0 点赞 0 评论 71 浏览 评分:0.0
编写题解 1866: 三位数反转 摘要:#include<bits/stdc++.h>using namespace std;int main(){ int i; …… 题解列表 2025年09月10日 0 点赞 0 评论 102 浏览 评分:0.0
编写题解 2751: 超级玛丽游戏 摘要:#include<bits/stdc++.h>using namespace std;int main(){ cout<<" &…… 题解列表 2025年09月10日 0 点赞 0 评论 116 浏览 评分:0.0
编写题解 2779: 输出绝对值 摘要:#include<bits/stdc++.h>using namespace std;int main(){ double i; &nbs…… 题解列表 2025年09月10日 0 点赞 0 评论 134 浏览 评分:0.0
编写题解 2780: 奇偶数判断 摘要:#include<bits/stdc++.h>using namespace std;int main(){ int i; …… 题解列表 2025年09月10日 0 点赞 0 评论 129 浏览 评分:0.0
c语言数组解法 摘要:参考代码:#include<stdio.h>int main(){ int L,M; int a,b; int arr[10000]={0}; int count=0; scanf(&qu…… 题解列表 2025年09月10日 0 点赞 0 评论 167 浏览 评分:0.0
c语言倒过来解题 摘要:解题思路:倒过来 第一天1个 第二天是(1+1)*2 第三天是(4+1)*2........依次类推到第n天 是 (第(n-1)天的量+1)*2注意事项:参考代码:#include<stdio.…… 题解列表 2025年09月10日 0 点赞 0 评论 185 浏览 评分:0.0
递推 + 前缀和 摘要:解题思路:递推 + 前缀和注意事项:参考代码:#include <iostream>#include <cstring>#include <algorithm>us…… 题解列表 2025年09月12日 0 点赞 0 评论 107 浏览 评分:0.0