题解列表

筛选

采药 , 结构求解,简单

摘要:解题思路:注意事项:参考代码:#include <stdlib.h>struct Medicine{ int time; int value;};int main(){ struct Medicine……

1711: 数据结构-有序表的折半查找

摘要:解题思路:理解好什么是折半查找后可看看参考代码喔(不喜勿喷,求饶过!)注意事项:循环结束后,要检查看看low是否在数组范围内!参考代码:#include<stdio.h>int search(int ……

约瑟夫环模拟法

摘要:解题思路:利用约瑟夫环解决问题注意事项:要求剩余人数剩余1时,才输出参考代码:#include<stdio.h>int main(){ int n,i,k,c; scanf("%d",&n); int……

简单易想到

摘要:解题思路:注意事项:参考代码:#include<stdio.h>void fun(int a[],int m,int n){ int b[n],i,j=0; for(i=n-m;i<n;i++){ ……

直接输入然后输出

摘要:解题思路:注意事项:参考代码:#include<stdio.h>int main(){    int a[10];    int i;    for(i=0;i<10;i++){        sca……

while循环的简单使用

摘要:解题思路:注意事项:参考代码:#include <stdio.h>int x(int n) {    int sum = 0;    if (n < 2) return 0;     while (n……