题目链接:https://cn.vjudge.net/problem/HDU-1032 水题 代码 #include <cstdio> #include <algorithm> using namespace std; const int MAX=8388608; int num[MAX], a, b; int solve(int n){ if (n<MAX && num[n]) return num[n]; if (n==1) return 1; if (n…
Wolf and Rabbit Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 7646 Accepted Submission(s): 3844 Problem Description There is a hill with n holes around. The holes are signed from 0 to n-1.A…
#include <iostream> using namespace std; int main() { int a,b,t,i,max; while(cin >> a >> b) { cout << a << " " << b << " "; if(a>b)//大小不确定 { t = a; a = b; b = t; } max = 0; for(i = a; i<=…