采药 (C语言代码) 摘要:解题思路:注意事项:参考代码:#include<stdio.h>int max(int a, int b){ return a>b ? a:b;}int main(){ int T, M,…… 题解列表 2019年05月21日 0 点赞 0 评论 1721 浏览 评分:0.0
蓝桥杯2017年第八届真题-k倍区间 (C++代码) 摘要: 前缀和对 K 取模,统计答案的时候就是前面有多少个前缀和与该位置前缀和 % K 下相等,这样相减之后这些区间和 % K 下等于 0,也就是 K 的倍数了,我用分块来维护(数据结构学傻了…… 题解列表 2019年05月21日 0 点赞 1 评论 815 浏览 评分:0.0
蓝桥杯2013年第四届真题-打印十字图 (C语言代码) 摘要:解题思路: 首先要计算n=1的时候长宽和n的关系。 在计算n=2的,n=3的,找到n与长宽关系。 之后先把n=1的逐行打印出来。 &nb 题解列表 2019年05月22日 0 点赞 0 评论 956 浏览 评分:0.0
弟弟的作业 (C语言代码) 摘要:解题思路:注意事项:参考代码:#include<stdio.h>#define N 200int main(){ char b[N],d[N]; int a[N],c[N],s[N]; int i=0…… 题解列表 2019年05月22日 0 点赞 0 评论 846 浏览 评分:0.0
2003年秋浙江省计算机等级考试二级C 编程题(2) (C语言代码) 摘要:解题思路:注意事项:记得考虑代码鲁棒性,即isprime函数调用时n值的判断,否则会运行出错。参考代码:#include <stdio.h>int isprime(int n){ if(n<2)ret…… 题解列表 2019年05月23日 0 点赞 0 评论 1158 浏览 评分:0.0
数据结构-集合union (C++代码)----momoc 摘要:解题思路:水一波题解注意事项:参考代码:#include <bits/stdc++.h> using namespace std; vector <int>a,b; int d[1000]; …… 题解列表 2019年05月23日 1 点赞 0 评论 1255 浏览 评分:0.0
C语言训练-排序问题<2> (C++代码) 摘要:解题思路:注意事项:参考代码:#include<iostream> #include<cstdio> #include<string> #include<cmath> #include<alg…… 题解列表 2019年05月23日 0 点赞 0 评论 655 浏览 评分:0.0
数字整除 (Java代码) 摘要:解题思路:大整数解决思路注意事项:直接上代码,注意事项将在代码中注释参考代码:import java.math.BigInteger; import java.util.Scanner; pu…… 题解列表 2019年05月23日 0 点赞 0 评论 1129 浏览 评分:0.0
蓝桥杯算法训练VIP-整数平均值 (C语言代码) 摘要:解题思路:注意事项:参考代码:#include<stdio.h> int main() { int i,n; scanf("%d",&n); int a[n],sum=0,*p; …… 题解列表 2019年05月23日 0 点赞 0 评论 947 浏览 评分:0.0
[竞赛入门]简单的a+b (C语言代码) 摘要:解题思路:利用scanf()函数的返回值,实现每接收两个数,就输出他们的和。注意事项:本题注意scanf函数的返回值就行了,有n个变量接收到了相应的值,那么scanf()函数就返回n。参考代码:#in…… 题解列表 2019年05月23日 1 点赞 0 评论 884 浏览 评分:0.0