题解列表
P1022 (C语言代码)
摘要:解题思路:注意事项:参考代码:#include <stdio.h>#include <math.h>int main() { long long int n; scanf("%lld", &n); i……
数据结构-稀疏矩阵转置 (C语言代码)
摘要:解题思路: 练习一下快速转置,只遍历三元组表一次,根据辅助数组确定入表位置。注意事项: 辅助数组的生成:遍历一次三元组表,记录原矩阵每列非0元素的个数,即可知道转置后每行非0元素个数和起始……
C语言训练-计算1977!* (C++代码)
摘要:解题思路:千万不要看这个啊,这是错误的解题思路注意事项:参考代码:#include<iostream>using namespace std;int main(){ cout << "44885501……
C语言程序设计教程(第三版)课后习题7.4 (C语言代码)
摘要:解题思路:注意事项:参考代码:#include<stdio.h>int main(){int i,j,k,l,s,a[100];for(i=0;i<9;i++)scanf("%d",&a[i]);pr……
数据结构-快速排序 (C++代码)
摘要:解题思路:注意事项:参考代码:#include <iostream>
using namespace std;
int n,a[100001];
void Quicksort(int Low,i……
【偶数求和】 (C语言代码)
摘要:解题思路:分为两种来算,一种为刚好有n组求平均值的,一种为有余下的不够n个数的另外求。注意事项:注意函数的值传递。参考代码:#include<stdio.h>#define N 100 void pj……
【计算两点间的距离】 (C语言代码)
摘要:解题思路:注意事项:参考代码:#include <stdio.h>
#include <math.h>
int main ()
{
double x1,y1,x2,y2;
double ……
回文串 (Java代码)
摘要:Scanner sc=new Scanner(System.in);
String ia=sc.nextLine();
String ib=new StringBuffer(ia).rev……
鸡兔同笼 (C语言代码)
摘要:解题思路:这一题完全可以用数学方法解题,得出x,y,然后判断一下就可以了。注意事项:参考代码:#include <stdio.h>
int main()
{
int n,m;
int x,……