递推 + 前缀和 解题思路:递推+前缀和注意事项:参考代码:#include#include#includeusingnamespacestd;constintN=100010,mod=5000011;intn, 题解列表 2025年09月12日 0 点赞 0 评论 432 浏览 评分:0.0
c语言倒过来解题 解题思路:倒过来第一天1个第二天是(1+1)*2第三天是(4+1)*2........依次类推到第n天是(第(n-1)天的量+1)*2注意事项:参考代码:#include#defineMAX10000intmain(){intN;scanf("%d", 题解列表 2025年09月10日 1 点赞 0 评论 829 浏览 评分:0.0
c语言数组解法 参考代码:#includeintmain(){intL,M;inta,b;intarr[10000]={0};intcount=0;scanf("%d%d",&L,&M);for(inti=0;i<=L;i++){arr[i]==0;}for(inti=0;i 题解列表 2025年09月10日 2 点赞 0 评论 752 浏览 评分:0.0 编写题解 2780: 奇偶数判断 摘要:#include<bits/stdc++.h>using namespace std;int main(){ int i; …… 题解列表 2025年09月10日 0 点赞 0 评论 753 浏览 评分:10.0 编写题解 2779: 输出绝对值 摘要:#include<bits/stdc++.h>using namespace std;int main(){ double i; &nbs…… 题解列表 2025年09月10日 0 点赞 0 评论 658 浏览 评分:0.0 编写题解 2751: 超级玛丽游戏 摘要:#include<bits/stdc++.h>using namespace std;int main(){ cout<<" &…… 题解列表 2025年09月10日 1 点赞 1 评论 839 浏览 评分:10.0 编写题解 1866: 三位数反转 摘要:#include<bits/stdc++.h>using namespace std;int main(){ int i; …… 题解列表 2025年09月10日 0 点赞 0 评论 575 浏览 评分:0.0 利用vector定义数组大小,static_cast显式转换 解题思路:注意事项:参考代码:#includeusingnamespacestd;#includeintmain(){intn=0;cin>>n;switch(n){case1:{cout<<"2.00"< 题解列表 2025年09月10日 0 点赞 0 评论 449 浏览 评分:0.0 1123-列出最简真分数列表 摘要:代码:#include int main() { for (int i = 0; i …… 题解列表 2025年09月09日 0 点赞 0 评论 428 浏览 评分:0.0 使用gets不能使用fgets,原因:笔者认为第二个测试用例太长了,超过了一行,因此使用gets无限制读取,直到读到空格和回撤符号 #include#include#includeintcompare(constvoid*p1,constvoid*p2){constchar*a=(constchar*)p1;constchar*b=(constchar*)p2;return 题解列表 2025年09月08日 0 点赞 0 评论 397 浏览 评分:0.0 « 12...99100101102103104105...59105911 »
编写题解 2780: 奇偶数判断 摘要:#include<bits/stdc++.h>using namespace std;int main(){ int i; …… 题解列表 2025年09月10日 0 点赞 0 评论 753 浏览 评分:10.0
编写题解 2779: 输出绝对值 摘要:#include<bits/stdc++.h>using namespace std;int main(){ double i; &nbs…… 题解列表 2025年09月10日 0 点赞 0 评论 658 浏览 评分:0.0
编写题解 2751: 超级玛丽游戏 摘要:#include<bits/stdc++.h>using namespace std;int main(){ cout<<" &…… 题解列表 2025年09月10日 1 点赞 1 评论 839 浏览 评分:10.0
编写题解 1866: 三位数反转 摘要:#include<bits/stdc++.h>using namespace std;int main(){ int i; …… 题解列表 2025年09月10日 0 点赞 0 评论 575 浏览 评分:0.0
利用vector定义数组大小,static_cast显式转换 解题思路:注意事项:参考代码:#includeusingnamespacestd;#includeintmain(){intn=0;cin>>n;switch(n){case1:{cout<<"2.00"< 题解列表 2025年09月10日 0 点赞 0 评论 449 浏览 评分:0.0 1123-列出最简真分数列表 摘要:代码:#include int main() { for (int i = 0; i …… 题解列表 2025年09月09日 0 点赞 0 评论 428 浏览 评分:0.0 使用gets不能使用fgets,原因:笔者认为第二个测试用例太长了,超过了一行,因此使用gets无限制读取,直到读到空格和回撤符号 #include#include#includeintcompare(constvoid*p1,constvoid*p2){constchar*a=(constchar*)p1;constchar*b=(constchar*)p2;return 题解列表 2025年09月08日 0 点赞 0 评论 397 浏览 评分:0.0 « 12...99100101102103104105...59105911 »
1123-列出最简真分数列表 摘要:代码:#include int main() { for (int i = 0; i …… 题解列表 2025年09月09日 0 点赞 0 评论 428 浏览 评分:0.0
使用gets不能使用fgets,原因:笔者认为第二个测试用例太长了,超过了一行,因此使用gets无限制读取,直到读到空格和回撤符号 #include#include#includeintcompare(constvoid*p1,constvoid*p2){constchar*a=(constchar*)p1;constchar*b=(constchar*)p2;return 题解列表 2025年09月08日 0 点赞 0 评论 397 浏览 评分:0.0