1003 Crashing Balloon】的更多相关文章

ZOJ Problem Set - 1003 Crashing Balloon Time Limit: 2 Seconds      Memory Limit: 65536 KB On every June 1st, the Children's Day, there will be a game named "crashing balloon" on TV.   The rule is very simple.  On the ground there are 100 labeled…
题目链接:http://acm.zju.edu.cn/onlinejudge/showProblem.do?problemId=3 题目大意:给你a,b两个数,问当b由约数1到100组成时,a能否由其它约数也在1到100的组成 就是dfs先枚举b的乘积组合,再看a有没有组合能够乘出来.. 代码: #include <cstdio> #include <cstdlib> #include <string> #include <iostream> #includ…
考察DFS的应用,判断两个数的因子. #include <stdio.h> int f1,f2; void DFS(int m,int n,int k){ ){ f2=; ) f1=; } ) return; ) DFS(m/k,n,k-); ) DFS(m,n/k,k-); DFS(m,n,k-); } int main(){ int a,b,temp; ){ if(a<b){ temp=a; a=b; b=temp; } f1=f2=; DFS(a,b,); temp=(!f1&am…
#include<cstdio> #include<cstring> #include<cmath> #include<algorithm> using namespace std; int n,m; int flag1,flag2; void dfs(int a,int b,int x) { ) { flag2=; ) flag1=; } if(flag1&&flag2) return; ) return; ) dfs(a/x,b,x-);…
Crashing Balloon Time Limit: 2 Seconds      Memory Limit: 65536 KB On every June 1st, the Children's Day, there will be a game named "crashing balloon" on TV.   The rule is very simple.  On the ground there are 100 labeled balloons, with the num…
Crashing Balloon Time Limit: 2 Seconds      Memory Limit: 65536 KB On every June 1st, the Children's Day, there will be a game named "crashing balloon" on TV.   The rule is very simple.  On the ground there are 100 labeled balloons, with the num…
题目概述:Crashing Balloon On every  June 1st, the Children's Day, there will be a game named "crashing balloon" on  TV.   The rule is very simple.  On the ground there are 100 labeled balloons,  with the numbers 1 to 100. After the referee shouts &q…
http://acm.zju.edu.cn/onlinejudge/showProblem.do?problemId=3 题意(难以描述):A,B两个人从1~100选数乘起来比谁的大(不能选重复的或者对方选的).数小的人如果发现数大的人在撒谎,则他可以获胜.(当然都没撒谎大数赢,都撒谎了也是大数赢233)而他判断大数撒谎的方法就是找到自己选的一个数,是构成大数所必须的./*给你两个数,由1~100选取不重复的数乘起来得到的.如果小的那个数包含了某个大数必须包含的因子,则*/ 题解:从1到100…
acm之pku题目分类 对ACM有兴趣的同学们可以看看 DP:  1011   NTA                 简单题  1013   Great Equipment     简单题  1024   Calendar Game       简单题  1027   Human Gene Functions   简单题  1037   Gridland            简单题  1052   Algernon s Noxious Emissions 简单题  1409   Commun…
以下是poj百道水题,新手可以考虑从这里刷起 搜索1002 Fire Net1004 Anagrams by Stack1005 Jugs1008 Gnome Tetravex1091 Knight Moves1101 Gamblers1204 Additive equations 1221 Risk1230 Legendary Pokemon1249 Pushing Boxes 1364 Machine Schedule1368 BOAT1406 Jungle Roads1411 Annive…