
CSU
文章平均质量分 82
_Occult_
物語が始まった
展开
-
CSU 1113 Updating a Dictionary
DescriptionIn this problem, a dictionary is collection of key-value pairs, where keys are lower-case letters, and values are non-negative integers. Given an old dictionary and a new dictionary,原创 2015-04-07 12:35:47 · 349 阅读 · 0 评论 -
CSU 1813 盖房子
DescriptionBobo 在 ICPCCamp 买了一块 n×m 的土地,其中有些格子是障碍。他想选择两个矩形区域,建造两座房子。 很明显,用于盖房子的区域不能包含障碍。同时,两个区域不能相交(但是可以相邻)。Bobo 想知道所有可能不同方案的数量除以 (109+7) 的余数。Input输入包含不超过 10 组数据。每组数据的第一行包含两个整数 n,m原创 2016-09-05 18:37:03 · 945 阅读 · 0 评论 -
CSU 1807 最长上升子序列~
[Submit][Status][Web Board]DescriptionBobo 在 ICPCCamp 学会了解决最长上升子序列问题后得到了一个长度为 n 的数列 p1,p2,…,pn.Bobo 想用 1,2,…,n 来替换其中值为 0 的元素,使得 p1,p2,…,pn 互不相同(即 p1,p2,…,pn 是 {1,2,…,n} 的排列)。现在 Bobo原创 2016-09-06 12:19:10 · 932 阅读 · 0 评论 -
CSU 1811 Tree Intersection
DescriptionBobo has a tree with n vertices numbered by 1,2,…,n and (n-1) edges. The i-th vertex has color ci, and the i-th edge connects vertices ai and bi.Let C(x,y) denotes the set of colors原创 2016-09-04 15:18:28 · 1162 阅读 · 2 评论 -
CSU 1806 Toll
Description In ICPCCamp, there are n cities and m unidirectional roads between cities. The i-th road goes from the ai-th city to the bi-th city. For each pair of cities u and v, there is at most原创 2016-09-05 19:52:38 · 636 阅读 · 0 评论 -
CSU 1561 (More) Multiplication
Educators are always coming up with new ways to teach math to students. In 2011, an educational software company, All Computer Math (ACM), developed an application to display products in a traditional原创 2017-07-29 19:37:54 · 334 阅读 · 0 评论 -
CSU 1562 Fun House
American Carnival Makers Inc. (ACM) has a long history of designing rides and attractions. One of their more popular attractions is a fun house that includes a room of mirrors. Their trademark is to s原创 2017-07-29 19:41:23 · 357 阅读 · 0 评论 -
CSU 1563 Lexicography
An anagram of a string is any string that can be formed using the same letters as the original. (We consider the original string an anagram of itself as well.) For example, the string ACM has the foll原创 2017-07-29 19:44:43 · 321 阅读 · 0 评论 -
CSU 1565 Word Cloud
A word cloud (or tag cloud) is a visual representation of textual data based on a weighted metric. In the above cloud (which is based on this year's list of Mid-Central teams), the font size of each w原创 2017-07-29 19:46:50 · 304 阅读 · 0 评论 -
CSU 1566 The Maze Makers
The Maze Makers is a publisher of puzzle books. One of their most popular series is maze books. They have a program that generates rectangular two-dimensional mazes like the one shown in Figure 1. The原创 2017-07-29 19:49:51 · 340 阅读 · 0 评论 -
CSU 1567 Reverse Rot
A very simplistic scheme, which was used at one time to encode information, is to rotate the characters within an alphabet and rewrite them. ROT13 is the variant in which the characters A-Z are rotate原创 2017-07-29 19:55:40 · 367 阅读 · 0 评论 -
CSU 1568 Shrine Maintenance
A religious sect has holy sites with shrines placed around a circle of radius 1000. The circle is split into N equal length arcs and the endpoints are numbered in order, 1 through N. The first figure原创 2017-07-29 20:01:59 · 366 阅读 · 0 评论 -
CSU 1809 Parenthesis
DescriptionBobo has a balanced parenthesis sequence P=p1 p2…pn of length n and q questions.The i-th question is whether P remains balanced after pai and pbi swapped. Note that questions are原创 2016-09-03 22:01:08 · 778 阅读 · 0 评论 -
CSU 1808 地铁
Description Bobo 居住在大城市 ICPCCamp。ICPCCamp 有 n 个地铁站,用 1,2,…,n 编号。 m 段双向的地铁线路连接 n 个地铁站,其中第 i 段地铁属于 ci 号线,位于站 ai,bi 之间,往返均需要花费 ti 分钟(即从 ai 到 bi 需要 ti 分钟,从 bi 到 ai 也需要 ti分钟)。众所周知,换乘线路很麻烦。如原创 2016-09-04 14:14:52 · 800 阅读 · 0 评论 -
CSU 1115 最短的名字
Description在一个奇怪的村子中,很多人的名字都很长,比如aaaaa, bbb and abababab。名字这么长,叫全名显然起来很不方便。所以村民之间一般只叫名字的前缀。比如叫'aaaaa'的时候可以只叫'aaa',因为没有第二个人名字的前三个字母是'aaa'。不过你不能叫'a',因为有两个人的名字都以'a'开头。村里的人都很聪明,他们总是用最短的称呼叫人。输入保证村里原创 2015-04-07 12:37:06 · 672 阅读 · 0 评论 -
CSU 1655 文本计算器
Description Bob讨厌复杂的数学运算.看到练习册上的算术题,Bob很是头痛.为了完成作业,Bob想要你帮忙写一个文本版的四则运算计算器.这个计算器的功能需求十分简单,只要可以处理加减乘除和括号就可以了.你能够帮助Bob吗?Input每个样例一行,输入一个长度小于1500的包含有'(',')','+','-','*','/',和原创 2015-07-18 21:16:38 · 467 阅读 · 0 评论 -
CSU 1640 机智的刷题方式
Description小B想参加中南大学2015年大学生程序设计竞赛暑期集训,相信猛刷自然强的小B表示做题进集训队完全不是事~当然刷题还是有一定技巧的,考虑到每种题的分值不一样,难度不一样,小B要在上面做一些权衡。分数与题目对应关系如下:入门题1分/题基础题2分/题进阶题5分/题首先,小原创 2015-07-18 21:15:35 · 598 阅读 · 0 评论 -
CSU 1650 影魔大战
Description Bob讨厌复杂的数学运算.看到练习册上的算术题,Bob很是头痛.为了完成作业,Bob想要你帮忙写一个文本版的四则运算计算器.这个计算器的功能需求十分简单,只要可以处理加减乘除和括号就可以了.你能够帮助Bob吗?Input每个样例一行,输入一个长度小于1500的包含有'(',')','+','-','*','/',和原创 2015-07-18 21:18:19 · 561 阅读 · 0 评论 -
CSU 1639 队长,我想进集训队!
Description“队长,我想进集训队!”这是小A内心的愿望,然而进集训队是有一定要求的,小A现在只知道自己的情况,请你帮他/她判断一下是否可以进入集训队。已知进入集训队的条件如下:以下所有成绩累加,男生达到 90 分,女生达到 60 分。(1) COJ入门题1分/题基础题2分/题进阶题5分原创 2015-07-18 21:13:19 · 586 阅读 · 0 评论 -
CSU 1632 Repeated Substrings
DescriptionString analysis often arises in applications from biology and chemistry, such as the study of DNA and protein molecules. One interesting problem is to find how many substrings are rep原创 2016-08-28 16:47:43 · 473 阅读 · 0 评论 -
CSU 1116 Kingdoms
DescriptionA kingdom has n cities numbered 1 to n, and some bidirectional roads connecting cities. The capital is always city 1.After a war, all the roads of the kingdom are destroyed. The kin原创 2015-04-07 12:39:28 · 643 阅读 · 0 评论 -
CSU 1803 2016
Description 给出正整数 n 和 m,统计满足以下条件的正整数对 (a,b) 的数量:1. 1≤a≤n,1≤b≤m;2. a×b 是 2016 的倍数。Input输入包含不超过 30 组数据。每组数据包含两个整数 n,m原创 2016-09-03 21:48:25 · 511 阅读 · 0 评论 -
CSU 1804 有向无环图
DescriptionBobo 有一个 n 个点,m 条边的有向无环图(即对于任意点 v,不存在从点 v 开始、点 v 结束的路径)。为了方便,点用 1,2,…,n 编号。 设 count(x,y) 表示点 x 到点 y 不同的路径数量(规定 count(x,x)=0),Bobo 想知道除以 (109+7) 的余数。其中,ai,bj 是给定的数列。I原创 2016-09-03 21:51:43 · 1102 阅读 · 0 评论 -
CSU 1810 Reverse
DescriptionBobo has a n digits decimal number D=d1 d2…dn (It may have leading zeros).Let R(i,j) denotes number D with digits between the i-th position and j-th position reversed. That is, R(i,原创 2016-09-03 22:14:22 · 565 阅读 · 0 评论 -
CSU 1812 三角形和矩形
DescriptionBobo 有一个三角形和一个矩形,他想求他们交的面积。具体地,三角形和矩形由 8 个整数 x1,y1,x2,y2,x3,y3,x4,y4 描述。 表示三角形的顶点坐标是 (x1,y1),(x1,y2),(x2,y1), 矩形的顶点坐标是 (x3,y3),(x3,y4),(x4,y4),(x4,y3).Input输入包含不超过 30000原创 2016-09-03 22:18:26 · 804 阅读 · 0 评论 -
CSU 1569 Wet Tiles
Alice owns a construction company in the town of Norainia, famous for its unusually dry weather. In fact, it only rains a few days per year there. Because of this phenomenon, many residents of Noraini原创 2017-07-29 20:04:04 · 468 阅读 · 0 评论