描述 A tug of war is to be arranged at the local office picnic. For the tug of war, the picnickers must be divided into two teams. Each person must be o ...
分类:
其他好文 时间:
2017-08-09 14:21:38
阅读次数:
220
来自洛谷的两道AC自动机模板题; 【模板】AC自动机(简单版) 题目背景 这是一道简单的AC自动机模板题。 用于检测正确性以及算法常数。 为了防止卡OJ,在保证正确的基础上只有两组数据,请不要恶意提交。 管理员提示:本题数据内有重复的单词,且重复单词应该计算多次,请各位注意 题目描述 给定n个模式串 ...
分类:
其他好文 时间:
2017-08-08 19:56:31
阅读次数:
194
1117 - RE:从零开始的异世界生活 Time Limit:1s Memory Limit:256MByte Submissions:438Solved:68 1117 - RE:从零开始的异世界生活 Time Limit:1s Memory Limit:256MByte Submissions ...
分类:
其他好文 时间:
2017-08-08 00:24:14
阅读次数:
384
题目: Given an array of integers and an integer k, find out whether there are two distinct indices i and j in the array such that nums[i] = nums[j] and ...
分类:
其他好文 时间:
2017-08-07 18:29:42
阅读次数:
105
描述 有n堆石子排成一条直线,每堆石子有一定的重量。现在要合并这些石子成为一堆石子,但是每次只能合并相邻的两堆。每次合并需要消耗一定的体力,该体力为所合并的两堆石子的重量之和。问最少需要多少体力才能将n堆石子合并成一堆石子? 有n堆石子排成一条直线,每堆石子有一定的重量。现在要合并这些石子成为一堆石 ...
分类:
其他好文 时间:
2017-08-07 15:17:33
阅读次数:
120
二、并查集 1. 例题 题目1012:畅通工程 时间限制:1 秒 内存限制:32 兆 特殊判题:否 提交:10519 解决:4794 题目描述: 某省调查城镇交通状况,得到现有城镇道路统计表,表中列出了每条道路直接连通的城镇。省政府“畅通工程”的目标是使全省任何两个城镇间都可以实现交通(但不一定有直 ...
分类:
其他好文 时间:
2017-08-07 13:37:26
阅读次数:
252
Given a set of distinct integers, nums, return all possible subsets. Note: Elements in a subset must be in non-descending order.The solution set must ...
分类:
其他好文 时间:
2017-08-07 10:14:53
阅读次数:
116
莫名其妙还找到了另一个铟炔锶烃的OJ : Codeup墓地 25481: swan 题目描述 两头白天鹅生活在一个部分湖面结了冰的湖泊中,湖面的形状为一个长方形,并且被分割成R行C列的小方格,某些方格中结了冰,这样的方格称之为冰格,其余的方格称之为水格。 冬天过去了,湖面上的冰渐渐开始溶解了,每一天 ...
分类:
其他好文 时间:
2017-08-06 20:43:53
阅读次数:
216
1121 - Reverse the lights Time Limit:2s Memory Limit:256MByte Submissions:376Solved:111 1121 - Reverse the lights Time Limit:2s Memory Limit:256MByte ...
分类:
其他好文 时间:
2017-08-06 17:02:46
阅读次数:
79
Description 改错题: 设计一个日期类和时间类,并编写全局函数display用于显示日期和时间。要求:display函数作为类外的普通函数,而不是成员函数 在主函数中调用display函数。display函数分别引用Time和Date两个类的对象的私有数据。输出年、月、日和时、分、秒。 I ...
分类:
其他好文 时间:
2017-08-06 14:58:02
阅读次数:
107