Yi Sima was one of the best counselors of Cao Cao. He likes to play a funny game himself. It looks like the modern Sudoku, but smaller. Actually, Yi Sima was playing it different. First of all, he tried to generate a 4×44×4 board with every row conta…
Sudoku Time Limit : 4000/2000ms (Java/Other) Memory Limit : 131072/65536K (Java/Other) Total Submission(s) : 15 Accepted Submission(s) : 12 Special Judge Problem Description Sudoku is a very simple task. A square table with 9 rows and 9 columns i…
题目链接:http://poj.org/problem?id=3074 Sudoku Time Limit: 1000MS Memory Limit: 65536K Total Submissions: 10451 Accepted: 3776 Description In the game of Sudoku, you are given a large 9 × 9 grid divided into smaller 3 × 3 subgrids. For example, . 2 7…
POJ2386 Lake Counting Time Limit: 1000MS Memory Limit: 65536K Total Submissions: 25366 Accepted: 12778 Description Due to recent rains, water has pooled in various places in Farmer John's field, which is represented by a rectangle of N x M (1 <=…
考试T1CE... 最近不适合考试 T1 扶苏是个喜欢一边听古风歌一边写数学题的人,所以这道题其实是五三原题.歌曲中的主人公看着墙边的海棠花,想起当年他其实和自己沿着墙边种了一排海棠,但是如今都已枯萎,只剩下那一株,寄托着对他深深的思念.沿着墙一共有 n 个位置可以种下海棠花,主人公记得自己当年和他一共种下了 m朵,由于花的特性,海棠不能紧挨着种植,也就是两朵海棠花之间最少间隔一个不种花的空位置.但是她记不清当时海棠花具体是怎么摆放的了,所以她想知道一共有多少方案使得 m 朵海棠花都被种下且两两…
容斥原理 A Number Sequence 题意:给出n个数,b1,b2,b3……bn,构造n个数,a1,a2,……an(ai>1),使得a1*a2*a3……an=b1*b2……bn 分析:容易想到的是将bi分解质因数,然后记录每个质因数的个数.那么题目变成:对于(每个质因数个数为m个划分到n个不同的容器的方案数),注意ai>1,所以没有某个数没有质因数.记f(n)为n个数字可能有1的方案数,g(n)为n个数字一定没有1的方案数.则,得到听说这是二项式反演? #include <bit…
Balloons Time Limit: 1000ms Memory limit: 65536K 有疑问?点这里^_^ 题目描述 Both Saya and Kudo like balloons. One day, they heard that in the central park, there will be thousands of people fly balloons to pattern a big image. They were very interested about…
paip.语义分析--单字词形容词表180个 INSERT INTO t (word) SELECT DISTINCT word FROM `word_main` where tsisin is not null and tsisin like '%adj%' and LENGTH(word)=3 order by CONVERT(word USING gbk) ASC limit 10000 mysq按照拼音排序 排除重复 select * from t_n where wo…
Little Zu Chongzhi's Triangles Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 512000/512000 K (Java/Others)Total Submission(s): 743 Accepted Submission(s): 399 Problem Description Zu Chongzhi (429–500) was a prominent Chinese mathematicia…