10474专题

UVA 10474 --- Where is the Marble? 二分查找

Where is the Marble? Time Limit:3000MS     Memory Limit:0KB     64bit IO Format:%lld & %llu Submit  Status Description   Where is the Marble?  Raju and Meena love to play with Mar

UVa 10474 大理石在哪?

/* * 解题思路: * 简单的排序后查找 */ #include <stdio.h>#include <string.h>#include <stdlib.h>#define A 10010int a[ A ];int m,n;int cmp( const void *a , const void *b ){ return *( int *)a - *(int

UVa 10474 - Where is the Marble?

白书上把这个题分类为回溯法,但我觉得就是暴力啊 题意是:给出n, q,后面跟着n个数代表第i个石头上的数字a[i] 再给出q个数,让判断q个数在石头上是否出现,若出现输出found+位置,未出现输出not found 代码如下: #include <cstdio>#include <iostream>#include <algorithm>#define MAXN 10010#

uva 10474 Where is the Marble?

原题: Raju and Meena love to play with Marbles. They have got a lot of marbles with numbers written on them. At the beginning, Raju would place the marbles one after another in ascending order of the