I Think I Need a Houseboat Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others) Total Submission(s): 9530 Accepted Submission(s): 2733 Problem Description Fred Mapper is considering purchasing some land in Louisiana…
Description Edward is the headmaster of Marjar University. He is enthusiastic about chess and often plays chess with his friends. What's more, he bought a large decorative chessboard with N rows and M columns. Every day after work, Edward will place…
Description Golden ratio base (GRB) is a non-integer positional numeral system that uses the golden ratio (the irrational number (1+√5)/2 ≍ 1.61803399 symbolized by the Greek letter φ) as its base. It is sometimes referred to as base-φ, golden mean b…
Description Prof. Tigris is the head of an archaeological team who is currently in charge of an excavation in a site of ancient relics. This site contains relics of a village where civilization once flourished. One night, examining a writing r…
Pokémon GO Time Limit: 3000/1500 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 171 Accepted Submission(s): 104 Problem Description 众所周知,度度熊最近沉迷于 Pokémon GO. 今天它决定要抓住所有的精灵球! 为了不让度度熊失望,精灵球已经被事先放置在一个2*N的格子上,每一个格子上都…
I Think I Need a Houseboat Problem Description Fred Mapper is considering purchasing some land in Louisiana to build his house on. In the process of investigating the land, he learned that the state of Louisiana is actually shrinking by 50 square mil…
Ant Time Limit: 1 Second Memory Limit: 32768 KB There is an ant named Alice. Alice likes going hiking very much. Today, she wants to climb a cuboid. The length of cuboid's longest edge is n, and the other edges are all positive integers. Alice's…
题意:给n个元素,从n中选两个非空集合A和B.问有多少中选法? 递推: dp[n]表示元素个数为n的方案数,对于新来的一个元素,要么加入集合,要么不加入集合自成一个集合.加入集合有三种选择,A,B,E(可空的集合),或者自成集合,作为A或B,然后在选一个n-1个元素的非空子集(2^n-1 - 1). #include<cstdio> ; typedef unsigned long long ll; int main() { int n; scanf("%d",&n)…
ll power(ll a, ll b, ll p) { ll ans = 1 % p; for (; b; b >>= 1) { if (b & 1) ans = ans * a % p; a = a * a % p; } return ans; } long long mm[500000]; void init(ll n, ll k) { mm[1] = 1; for (ll i =2; i <= n; i++) { mm[i] = ((mm[i - 1] * (k + i…