ICode9

精准搜索请尝试: 精确搜索
  • 算法分析与设计——算法问题求解基础2022-01-20 14:31:38

    一、实验目的 1.熟悉C/C++语言的集成开发环境; 2.掌握算法的概念; 3.了解问题的求解方法; 4.理解递归思想,学会编写递归。 二、实验原理 算法(algorithm) 一个算法是对特定问题求解步骤的一种描述,它是指令的有限序列。算法具有下列 5个特征: 输入(input);输出(output);确定性(definitenes

  • 题解 P1650 田忌赛马2021-02-19 19:35:10

    (题面来自洛谷) 题目描述 我国历史上有个著名的故事: 那是在2300年以前。齐国的大将军田忌喜欢赛马。他经常和齐王赛马。他和齐王都有三匹马:常规马,上级马,超级马。一共赛三局,每局的胜者可以从负者这里取得200银币。每匹马只能用一次。齐王的马好,同等级的马,齐王的总是比田忌的要好一

  • C++经典算法题-八枚银币2020-01-17 12:04:53

    9.Algorithm Gossip: 八枚银币 说明 现有八枚银币a b c d e f g h,已知其中一枚是假币,其重量不同于真币,但不知是较轻或较重,如何使用天平以最少的比较次数,决定出哪枚是假币,并得知假币比真币较轻或较重。 解法 单就求假币的问题是不难,但问题限制使用最少的比较次数,所以我们不能

  • Coins POJ - 17422019-08-02 09:54:44

    People in Silverland use coins.They have coins of value A1,A2,A3...An Silverland dollar.One day Tony opened his money-box and found there were some coins.He decided to buy a very nice watch in a nearby shop. He wanted to pay the exact price(without change

  • Coins POJ - 17422019-08-02 09:54:22

    People in Silverland use coins.They have coins of value A1,A2,A3...An Silverland dollar.One day Tony opened his money-box and found there were some coins.He decided to buy a very nice watch in a nearby shop. He wanted to pay the exact price(without change

  • C++ 分治思想 真假银币2019-07-07 12:51:02

    1 #include "stdio.h" 2 #include "iostream" 3 #define MAXNUM 30 4 5 int FalseCoin(int coin[], int low, int heigh) 6 { 7 int i, sum1, sum2, sum3; 8 int re; 9 10 sum1 = sum2 = sum3 = 0;11 if (low + 1 == heigh)12 {13 if (coin[low] < c

专注分享技术,共同学习,共同进步。侵权联系[81616952@qq.com]

Copyright (C)ICode9.com, All Rights Reserved.

ICode9版权所有