摘要:
一、题目http://poj.grids.cn/practice/2792/时间限制:3000ms内存限制:65536kB描述给出2个正整数集合A = {pi| 1 <= i <= a},B = {qj| 1 <= j <= b}和一个正整数s。问题是:使得pi+ qj= s的不同的(i, j)对有多少个。输入第1行是测试数据的组数n,后面跟着n组测试数据。每组测试数据占5行,第1行是和s (1 <= s <= 10000),第2行是一个正整数a (1 <= a <= 10000),表示A中元素的数目。第3行是a个正整数,每个正整数不超过1000 阅读全文
摘要:
一、题目2779:Counting Blackhttp://poj.grids.cn/practice/2779/时间限制:1000ms内存限制:65536kB描述There is a board with 100 * 100 grids as shown below. The left-top gird is denoted as (1, 1) and the right-bottom grid is (100, 100).We may apply three commands to the board:1. WHITE x, y, L // Paint a white square on 阅读全文