传送门:http://poj.org/problem?id=3565 Ants Time Limit: 5000MS Memory Limit: 65536K Total Submissions: 7650 Accepted: 2424 Special Judge Description Young naturalist Bill studies ants in school. His ants feed on plant-louses that live on apple tree…
Ant Counting Time Limit: 1000MS Memory Limit: 65536K Total Submissions: 4982 Accepted: 1896 Description Bessie was poking around the ant hill one day watching the ants march to and fro while gathering food. She realized that many of the ants were…
题目:http://poj.org/problem?id=3046 思路: dp [i] [j] :=前i种 构成个数为j的方法数. #include <cstdio> #include <cstring> #include <iostream> int T,A,S,B; int hash[1010]; int dp[1010][10100]; const int MOD=1e6; using namespace std; int main(){ while(cin&g…
Ant Counting Time Limit : 2000/1000ms (Java/Other) Memory Limit : 131072/65536K (Java/Other) Total Submission(s) : 3 Accepted Submission(s) : 2 Problem Description Bessie was poking around the ant hill one day watching the ants march to and fro w…
Description Young naturalist Bill studies ants in school. His ants feed on plant-louses that live on apple trees. Each ant colony needs its own apple tree to feed itself. Bill has a map with coordinates of n ant colonies and n apple trees. He knows t…