woj专题

WOJ-1167

Problem 1167 - Oil Detecting Time Limit: 1000MS Memory Limit: 65536KB Difficulty: 1 Total Submit: 475 Accepted: 212 Special Judge: No Description 石油公司在某地开采石油,他们把地面(长方形)分成一个个的小正方形,然后逐个勘探,有的正方形探到了石油

(eclipse ,idea,netBeans,,,,)WOJ 插件

WOJ 插件能让你看到各个项目的源码和文档,对于我们研究项目的非常的有帮助,非常的便利. 具体的请查看 http://www.worldofjava.org/homepage.do

woj 1022 Competition of Programming

贪心。记住这个。。。 /** Author: stormdpzh* Created Time: 2012/7/14 15:21:06* File Name: woj_1022.cpp*/#include <iostream>#include <cstdio>#include <sstream>#include <cstring>#include <string>#include

woj 1010 Alternate Sum

证明结论之后很简单。考虑集合中每个元素最终对和的贡献: (1)考虑集合中最大的一个元素,设为t,则在有 t 的子集中,求Alternate Sum时 t 一定是+的(因为它排序后只能在第一个位置),这样的集合有2 ^ (n - 1) 个,从而 t 的贡献为t * 2 ^ (n - 1); (2)考虑集合中第二大的元素 t1,它要在子集合中求Alternate Sum时以 - 的形式出现,则该子

woj 1006 Language of Animals

不要被数据范围吓到…… 链表+简单的bfs。不喜欢用链表所以写了vector。 /** Author: stormdpzh* Created Time: 2012/7/11 22:19:27* File Name: woj_1006.cpp*/#include <iostream>#include <cstdio>#include <sstream>#include <cstrin

woj 1005 Holding Animals

一个简单的背包问题。dp /** Author: stormdpzh* Created Time: 2012/7/11 21:23:48* File Name: woj_1005.cpp*/#include <iostream>#include <cstdio>#include <sstream>#include <cstring>#include <string>#includ