题解列表
1038: [编程入门]宏定义练习之三角形面积
摘要:解题思路:注意事项:参考代码:#include<stdio.h>
#define swap(a,b,c) s=(a+b+c)/2;
#define get(a,b,c,s) area=pow((s……
1037: [编程入门]宏定义的练习
摘要:解题思路:注意事项:参考代码:#include<stdio.h>
#define swap(a,b) printf("%d",a%b);
int main()
{
int a,b;
scan……
1036: [编程入门]带参数宏定义练习
摘要:解题思路:注意事项:参考代码:#include<stdio.h>
#define swap(a,b) a^=b,b^=a,a^=b;
int main()
{
int a,b;
scanf(……
1035: [编程入门]自定义函数之字符类型统计
摘要:解题思路:注意事项:参考代码:#include<stdio.h>
#include<string.h>
#include<ctype.h>
char get(char ls[],int num[……
误落迷宫2-bfs=java
摘要:解题思路:将起点,结果,三夫人的位置记录下来bfs两次,第一次找到夫人的最短路劲,第二次是出口注意事项:TES都是可以走的。参考代码:
import java.util.LinkedList;
……
Ignatius and the Princess IV (Java代码)
摘要:import java.util.Scanner;
import java.util.TreeMap;
public class Main {
publ……
倒杨辉三角形-java
摘要:解题思路:先吧杨辉三角形装入集合开始和结尾都是1,yh[i][j] = yh[i-1][j-1] + yh[i-1][j]难的是遍历格式。注意事项:参考代码:import java.util.Scan……
优质题解
[编程入门]自定义函数之字符类型统计
摘要:解题思路:首先需要定义两个数组,一个字符串数组用来保存字符串,一个整型数组用来保存每种字符的个数,在主函数中输入字符串,然后将两个数组的数组名同时传递给自定义函数calcul进行处理,利用if--el……
1034: [编程入门]自定义函数之数字分离
摘要:解题思路:注意事项:参考代码:#include<stdio.h>
int main()
{
int a,num[4],i;
scanf("%d",&a);
while(a){
num……