随笔分类 - online judge POJ
摘要:Description The Pizazz Pizzeria prides itself in delivering pizzas to its customers as fast as possible. Unfortunately, due to cutbacks, they can affo
阅读全文
摘要:Description In how many ways can you tile a 3xn rectangle with 2x1 dominoes? Here is a sample tiling of a 3x12 rectangle. Input Input consists of seve
阅读全文
摘要:描述 求把N*M的棋盘分割成若干个1*2的的长方形,有多少种方案。 例如当N=2,M=4时,共有5种方案。当N=2,M=3时,共有3种方案。 如下图所示: 输入格式 输入包含多组测试用例。 每组测试用例占一行,包含两个整数N和M。 当输入用例N=0,M=0时,表示输入终止,且该用例无需处理。 输出格
阅读全文
摘要:Bad Hair Day Description Some of Farmer John's N cows (1 ≤ N ≤ 80,000) are having a bad hair day! Since each cow is self-conscious about her messy hai
阅读全文
摘要:小C的数学问题 题目描述 小C是个云南中医学院的大一新生,在某个星期二,他的高数老师扔给了他一个问题。 让他在1天的时间内给出答案。 但是小C不会这问题,现在他来请教你。 请你帮他解决这个问题。 有n个数,每个数有权值。 数学老师定义了区间价值为区间和乘上区间内的最小值。 现在要你找出有最大区间价值
阅读全文
摘要:Highways Description The island nation of Flatopia is perfectly flat. Unfortunately, Flatopia has a very poor system of public highways. The Flatopian
阅读全文
摘要:Constructing Roads Description There are N villages, which are numbered from 1 to N, and you should build some roads such that every two villages can
阅读全文
摘要:Networking Description You are assigned to design network connections between certain points in a wide area. You are given a set of points in the area
阅读全文
摘要:题解 这是一道裸的最小生成树题,拿来练手,题目就不放了 个人理解 Prim有些类似最短路和贪心,不断找距当前点最小距离的点 Kruskal类似于并查集,不断找最小的边,如果不是一棵树的节点就合并为一颗树 AC代码: Prim算法: Kruskal算法:
阅读全文
摘要:http://poj.org/problem?id=3264 题意:给你一个长度为n的序列a[N] (1 ≤ N ≤ 50000),询问Q(1 ≤ Q ≤ 200000) 次,每次输出【L, R】区间最大值与最小值的差是多少。 只需把模板的求和改成求最大和最小即可
阅读全文
摘要:A Simple Problem with Integers Problem Description You have N integers, A1, A2, ... , AN. You need to deal with two kinds of operations. One type of o
阅读全文

浙公网安备 33010602011771号