07 2018 档案

Black And White (DFS 训练题)
摘要:G - Black And White G - Black And White G - Black And White 数据范围很小,可以直接用DFS深搜出结果,,但如果不把数据 按升序排好序 就去进行深搜的话,会超时,优先让数量最多的放在前面 然后 如果有一个数字的数量 > (M×N+1)/2 则 阅读全文

posted @ 2018-07-31 21:07 短发控丶 阅读(323) 评论(0) 推荐(0)

[JSOI2007] 建筑抢修 (贪心 + 优先队列)
摘要:小刚在玩JSOI提供的一个称之为“建筑抢修”的电脑游戏:经过了一场激烈的战斗,T部落消灭了所有z部落的入侵者。但是T部落的基地里已经有N个建筑设施受到了严重的损伤,如果不尽快修复的话,这些建筑设施将会完全毁坏。现在的情况是:T部落基地里只有一个修理工人,虽然他能瞬间到达任何一个建筑,但是修复每个建筑 阅读全文

posted @ 2018-07-28 17:01 短发控丶 阅读(233) 评论(0) 推荐(0)

17-比赛1 D - IPC Trainers (贪心 + 优先队列)
摘要:题目描述 本次印度编程训练营(Indian Programming Camp,IPC)共请到了 N 名教练。训练营的日程安排有 M 天,每天最多上一节课。第 i 名教练在第 Di 天到达,直到训练营结束才离开。第 i 名教练希望上 Ti 节课。要是少上了课,那么教练会感到扎心,每少上一节,扎心值就会 阅读全文

posted @ 2018-07-28 16:22 短发控丶 阅读(241) 评论(0) 推荐(1)

17-比赛1 C - Binary Nim (栈的游戏)
摘要:题目描述 Tweedle-Dee 和 Tweedle-Dum 正在进行一场激烈的二进制 Nim 游戏。这是你没有玩过的船新版本,游戏包含 N 个栈,每个栈只包含 0 和 1 的元素。就像一般的 Nim 游戏一样,两人轮流行动。玩家在一回合中,必须选择一个非空的栈,然后从栈顶取出至少一个元素。不过,T 阅读全文

posted @ 2018-07-28 15:36 短发控丶 阅读(198) 评论(0) 推荐(0)

17-比赛1 A - Weak in the Middle (栈)
摘要:题目描述 给定长度为 N 的序列 A。每天,序列 A 中所有比两侧元素都小的元素都会消失。对于原序列中所有元素,请求出它会在第几天之后消失(天数从 1 开始计算),或者指出它不会消失。 数据范围 1 ≤ T ≤ 1, 0001 ≤ N ≤ 1e51 ≤ Ai ≤ 1e9 输入格式 输入的第一行包含一 阅读全文

posted @ 2018-07-28 15:16 短发控丶 阅读(156) 评论(0) 推荐(0)

17-比赛1 F - 较小元素 Weak in the Middle (set)
摘要:Seg-El has last chance to make the final changes in order to prevent the destruction of Krypton. He is provided an array Arr[ ] of N elements. For eac 阅读全文

posted @ 2018-07-27 22:05 短发控丶 阅读(239) 评论(0) 推荐(0)

17-比赛1 B - 子串计算 Chef and his string challenge (string的运用)
摘要:Chef's best friend Jerry gives Chef a string A and wants to know the number of string A that can be obtained from another string B. A is made up of un 阅读全文

posted @ 2018-07-27 19:52 短发控丶 阅读(238) 评论(0) 推荐(0)

ACM模板
摘要:1 #include <iostream> //万能头文件#include<bits/stdc++.h> 方便时用 2 #include <algorithm> 3 #include <cmath> 4 #include <cstring> 5 #include <cstdio> 6 #includ 阅读全文

posted @ 2018-07-26 20:32 短发控丶 阅读(164) 评论(0) 推荐(0)

STL 入门 (17 暑假集训第一周)
摘要:快速全排列的函数 头文件<algorithm> find 搜寻失败会返回 string::npos 的值 string 的 erase() 删除函数 一个应用的题目,暑假集训第一周比赛 :17-比赛1 B - 子串计算 string的运用 string类的构造函数: string(const cha 阅读全文

posted @ 2018-07-26 10:42 短发控丶 阅读(248) 评论(0) 推荐(0)

UVA 1594 Ducci Sequence(紫书习题5-2 简单模拟题)
摘要:A Ducci sequence is a sequence of n-tuples of integers. Given an n-tuple of integers (a1, a2, · · · , an), the next n-tuple in the sequence is formed 阅读全文

posted @ 2018-07-26 10:04 短发控丶 阅读(206) 评论(0) 推荐(0)

UVA 1593 Alignment of Code(紫书习题5-1 字符串流)
摘要:You are working in a team that writes Incredibly Customizable Programming Codewriter (ICPC) which is basically a text editor with bells and whistles. 阅读全文

posted @ 2018-07-26 09:14 短发控丶 阅读(356) 评论(0) 推荐(0)

导航