问题 G: a interesting game 时间限制: 1 Sec 内存限制: 128 MB提交: 29 解决: 10[提交][状态][讨论版] 题目描述 One day,Kid is in class.But Kid think what the teacher teaching is so boring,so he decide to play a game with himself.He will give himself a matrix with n rows and m c…
问题 I: Kid and Ants 时间限制: 1 Sec 内存限制: 128 MB提交: 42 解决: 33[提交][状态][讨论版] 题目描述 Kid likes interest question,although he don’t like ants so much. Assume there is a infinite long stick whose direction is from East to West. In addition, there are n ants on…
http://acm.hdu.edu.cn/showproblem.php?pid=1495 第三个杯子的盛水量可由前两个杯子得到,而前两个杯子状态总数在100*100以内,穷举可实现 #include <cstdio> #include <cstring> #include <queue> using namespace std; const int mxind=101; const int maxn=mxind*mxind; int n,m,s; int dp[ma…
111.Very simple problem time limit per test: 0.5 sec. memory limit per test: 4096 KB You are given natural number X. Find such maximum integer number that it square is not greater than X. Input Input file contains number X (1≤X≤101000). Output Write…
import java.math.BigInteger; import java.util.Scanner; public class Main { static BigInteger p,l,r,div; static int n; public static int cmp(BigInteger mid){ BigInteger sum=mid.pow(n); return sum.compareTo(p); } public static BigInteger calc(){ l=BigI…
问题 H: Planar map 时间限制: 1 Sec 内存限制: 128 MB提交: 24 解决: 22[提交][状态][讨论版] 题目描述 Tigher has work for a long time in a famous company.One day she is given a planar map(look at the following) and a point.The planar map can be regarded as a polygon.The planar…
112. a^b-b^a time limit per test: 0.25 sec. memory limit per test: 4096 KB You are given natural numbers a and b. Find a^b-b^a. Input Input contains numbers a and b (1≤a,b≤100). Output Write answer to output. Sample Input 2 3Sample Output -1 import j…
1503:Integer Inquiry 总时间限制: 1000ms 内存限制: 65536kB 描述 One of the first users of BIT's new supercomputer was Chip Diller. He extended his exploration of powers of 3 to go from 0 to 333 and he explored taking various sums of those numbers. ``This super…
Sasha and Interesting Fact from Graph Theory n 个 点形成 m 个有标号森林的方案数为 F(n, m) = m * n ^ {n - 1 - m} 然后就没啥难度了... #include<bits/stdc++.h> #define LL long long #define LD long double #define ull unsigned long long #define fi first #define se second #defin…
Segment Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/65536 K (Java/Others) Problem Description Silen August does not like to talk with others.She like to find some interesting problems. Today she finds an interesting problem.She…
Description On the evening of 3 August 1492, Christopher Columbus departed from Palos de la Frontera with a few ships, starting a serious of voyages of finding a new route to India. As you know, just in those voyages, Columbus discovered the America…
You must have heard that the Chinese culture is quite different from that of Europe or Russia. So some Chinese habits seem quite unusual or even weird to us. So it is known that there is one popular game of Chinese girls. N girls stand forming a circ…