题解列表

筛选

2840: 向量点积计算

摘要:``` #include using namespace std; const int N=10000; int n,a[N],b[N],c,sum; int main() { cin>……

蓝桥杯基础练习VIP-分解质因数

摘要:解题思路:注意事项:参考代码:#include <stdio.h> // 计算质因数分解并输出 void primeFactors(int n) {     int divisor = 2;……

计算(a+b)*c的值(C++)

摘要:解题思路:用cin输入a,b,c 再用cout输出(a+b)*c学废了吗?注意事项:给孩子一个五星吧 求求了参考代码:#include <bits/stdc++.h>using namespace s……

3000: 交换值

摘要:解题思路:cin输入cout调换个顺序 很简单注意事项:给个五星吧 求求了参考代码:#include <bits/stdc++.h>using namespace std;int main(){   ……

短信计费(C语言)

摘要:解题思路:注意事项:参考代码:#include<stdio.h>int main(){    int a,b[10001];    int c=0,count=0;    scanf("%d",&a)……

c语言(详细解法)

摘要:解题思路:注意事项:参考代码:#include <stdio.h>#include <string.h>int findMaxSpan(char *S, char *S1, char *S2) {  ……

java,贪心解法,O(nlogn)时间复杂度

摘要:解题思路:    首先,看到代价和最少,很容易想到贪心。也就是对代价数组进行排序,优先修改代价小的元素注意事项:    答案记得设置为long,第九个测试点int会越界参考代码:        imp……

最大公约数与最小公倍数

摘要:解题思路:1、求最大公约数的方法:辗转相除法x = 5 , y = 7;max = 7 , min = 5;7 % 5 = 2;5 % 2 = 1;2 % 1 = 0;那么最大公约数就是1看到这里大家……