摘要: problem A 题意:三个怪兽,每次选一个怪兽造成一点伤害,第7的倍数次攻击改为对所有怪兽造成一点伤害,问能否一次性消灭三个怪兽 题解:sum是9的倍数且每个数不小于sum/9 证明:不难发现最简单的情况就是操作6次使得三个数都变成111然后再全部-1。考虑到多次的全部-1对这个最终态其实是没影 阅读全文
posted @ 2020-12-23 22:43 yz12138 阅读(68) 评论(0) 推荐(0) 编辑
摘要: 列车调度 传送门:https://pintia.cn/problem-sets/994805046380707840/problems/994805063166312448 火车站的列车调度铁轨的结构如下图所示。 两端分别是一条入口(Entrance)轨道和一条出口(Exit)轨道,它们之间有N条平 阅读全文
posted @ 2019-11-21 22:50 yz12138 阅读(138) 评论(0) 推荐(0) 编辑
摘要: POJ1330 Nearest Common Ancestors Description A rooted tree is a well-known data structure in computer science and engineering. An example is shown bel 阅读全文
posted @ 2019-10-25 22:29 yz12138 阅读(223) 评论(0) 推荐(0) 编辑
摘要: 870A 传送门 http://codeforces.com/problemset/problem/870/A 题意:给定长度为n,m的序列,n,m和序列中的数都在[1,9]中 让你找出最小的一个数,这个数所构成的数字必须是至少有一个在n序列,至少有一个在m序列。 当然,如果n,m中都有相同的数x, 阅读全文
posted @ 2017-10-18 00:43 yz12138 阅读(253) 评论(0) 推荐(0) 编辑
摘要: 1.积木大赛 (block.pas/c/cpp) 【问题描述】 为了庆祝国庆,厦门一中举办了一年一度的“积木大赛”。 在2013年NOIP大赛中,夏夏同学己经搭建了宽度为n的大厦,其中第i块高度为hi。今年比赛的内容是对其NOIP2013搭建大厦进行扩建,使用的材料也都是体积为1正方体积木。 今年搭 阅读全文
posted @ 2017-10-02 09:19 yz12138 阅读(217) 评论(1) 推荐(0) 编辑
摘要: FZ3ZOJ89 1 #include <iostream> 2 #include <string> 3 #include <string.h> 4 #include <cmath> 5 #include <stdio.h> 6 #include <algorithm> 7 #include <qu 阅读全文
posted @ 2016-11-18 10:20 yz12138 阅读(253) 评论(0) 推荐(0) 编辑
摘要: 1 #include <iostream> 2 #include <queue> 3 #include <vector> 4 using namespace std; 5 const int N=405; 6 struct rec 7 { 8 int v,w; 9 }; 10 vector<rec> 阅读全文
posted @ 2016-11-18 10:18 yz12138 阅读(467) 评论(0) 推荐(0) 编辑
摘要: 阅读全文
posted @ 2016-11-18 09:36 yz12138 阅读(181) 评论(0) 推荐(0) 编辑
摘要: 阅读全文
posted @ 2016-11-15 11:27 yz12138 阅读(300) 评论(0) 推荐(0) 编辑
摘要: f**k写完前两题睡觉去了。 A. Buy a Shovel 题意:给定两个数k,r表示一个铲子卖k元,现在你手上有无数个十元钱和一张r元的钱,问最少买几个铲子能让你用掉这张r元钱,或不用这张钱。 题解:“灭顶之灾” 这不就是一道思博题吗。。不说题解了 1 #include <iostream> 2 阅读全文
posted @ 2016-10-18 00:15 yz12138 阅读(396) 评论(0) 推荐(0) 编辑