用最朴素的C语言(不用数组,字符)解决这类问题 摘要:解题思路:通过循环的方式使a反复除以10,直至a==0,程序终止,可求得a的位数。再进行分类讨论,因为位数不同情况也不同。注意事项:一定要把数据a存到数据b里,因为循环之后a最终会==0,导致之后输出…… 题解列表 2024年10月07日 0 点赞 0 评论 440 浏览 评分:9.9
会战兵力 是80万对60万 优势在我 摘要:解题思路:注意事项:参考代码:#include <bits/stdc++.h>using namespace std;typedef long long ll;int prime(ll x){ …… 题解列表 2024年10月07日 0 点赞 0 评论 299 浏览 评分:9.9
C++使用Swap函数倒置字符串 摘要:解题思路:注意事项:参考代码:#include <iostream>using namespace std;int main(){ int num = 0;// 读入字符串长度 cin >…… 题解列表 2024年10月07日 0 点赞 0 评论 413 浏览 评分:0.0
蓝桥杯历届试题-数字游戏(暴力法) 摘要:解题思路:暴力循环注意事项:参考代码:#include<stdio.h>int main(){ int n,k,t; scanf("%d%d%d",&n,&k,&t); int a[…… 题解列表 2024年10月07日 0 点赞 0 评论 664 浏览 评分:9.9
to_string的大作用 摘要:参考代码:#include<bits/stdc++.h> using namespace std; #define int long long bool haoshu(int i) { s…… 题解列表 2024年10月07日 1 点赞 0 评论 275 浏览 评分:0.0
[食物链] 并查集 - NOI2001 提高组 摘要:# 并查集 路劲压缩 ###### 根据题目将所有的动物分为 被捕食 天敌 竞争对手 三种类型 分别存放于 并查集的 三个位置 分别求各自所属的“连通块” 思路 : 如果 1)当前的话与前面…… 题解列表 2024年10月07日 0 点赞 0 评论 386 浏览 评分:9.9
前缀和算法 摘要:参考代码:#include<bits/stdc++.h> using namespace std; #define int long long signed main() { int n;…… 题解列表 2024年10月07日 2 点赞 0 评论 329 浏览 评分:0.0
关键在于l和r的求法公式 摘要:参考代码:#include<bits/stdc++.h> using namespace std; #define int long long signed main() { int n;…… 题解列表 2024年10月07日 2 点赞 0 评论 633 浏览 评分:10.0
HH的范围是0-23格外注意,开longlong才够10^18!!! 摘要:参考代码:#include<bits/stdc++.h> using namespace std; #define int long long signed main() { int t;…… 题解列表 2024年10月07日 0 点赞 0 评论 211 浏览 评分:0.0
有意思的轮回 摘要:参考代码:#include<bits/stdc++.h> using namespace std; string s1[10]={"geng","xin","ren","gui","jia","y…… 题解列表 2024年10月08日 0 点赞 0 评论 272 浏览 评分:0.0