摘要: 【原题】 Generous sponsors of the olympiad in which Chloe and Vladik took part allowed all the participants to choose a prize for them on their own. Chris 阅读全文
posted @ 2020-08-14 14:47 kurum! 阅读(207) 评论(0) 推荐(0) 编辑
摘要: 【原题】 Problem Description It is well known that Keima Katsuragi is The Capturing God because of his exceptional skills and experience in ''capturing'' 阅读全文
posted @ 2020-08-13 20:31 kurum! 阅读(94) 评论(0) 推荐(0) 编辑
摘要: 题目描述 在一个圆形操场的四周摆放 \(N\) 堆石子,现要将石子有次序地合并成一堆.规定每次只能选相邻的2堆合并成新的一堆,并将新的一堆的石子数,记为该次合并的得分。 试设计出一个算法,计算出将$N$堆石子合并成 $1$ 堆的最小得分和最大得分。 输入格式 数据的第 $1$ 行是正整数 \(N\) 阅读全文
posted @ 2020-08-07 21:22 kurum! 阅读(91) 评论(0) 推荐(0) 编辑
摘要: 【原题】 题目背景 小 E 不幸在一场战斗中失去了他的金宝剑。 题目描述 制造一把金宝剑需要 $n$种原料,编号为 $1$ 到 \(n\),编号为 \(i\) 的原料的坚固值为 \(a_i\)。 炼金是很讲究放入原料的顺序的,因此小 E必须按照 $1$ 到 \(n\) 的顺序依次将这些原料放入炼金锅 阅读全文
posted @ 2020-08-07 19:16 kurum! 阅读(216) 评论(0) 推荐(0) 编辑
摘要: 【原题】 题目描述 给出 $1,2,…,n$ 的两个排列 $P1$和 \(P2\) ,求它们的最长公共子序列。 输入格式 第一行是一个数 \(n\)。 接下来两行,每行为$n$个数,为自然数$1,2,…,n$ 的一个排列。 输出格式 一个数,即最长公共子序列的长度。 输入输出样例 输入 #1 5 3 阅读全文
posted @ 2020-08-06 20:50 kurum! 阅读(147) 评论(0) 推荐(0) 编辑
摘要: 【原题】 题目描述 给定一个长度为 \(n\) 的字符序列 \(a\),初始时序列中全部都是字符 L。 有 $q$次修改,每次给定一个 \(x\),若 \(a_x\) 为 L,则将 $a_x$修改成 R,否则将 \(a_x\) 修改成 L。 对于一个只含字符 L,R 的字符串 \(s\),若其中不存 阅读全文
posted @ 2020-08-06 20:10 kurum! 阅读(166) 评论(0) 推荐(0) 编辑
摘要: 【原题】 题目描述 Erwin 最近对一种叫 thair 的东西巨感兴趣。。。 在含有 nnn 个整数的序列 \(a1,a2,…,an\) 中,三个数被称作thair当且仅当 \(i<j<k\) 且 \(ai<aj<ak\)。 求一个序列中 thair 的个数。 输入格式 开始一行一个正整数$n$, 阅读全文
posted @ 2020-08-04 23:03 kurum! 阅读(143) 评论(0) 推荐(0) 编辑
摘要: 【原题】 You are given a garland consisting of nn lamps. States of the lamps are represented by the string ss of length nn. The ii-th character of the str 阅读全文
posted @ 2020-07-30 10:03 kurum! 阅读(106) 评论(0) 推荐(0) 编辑
摘要: 【原题】 题目描述 The Byteotian Cave is composed of nnn chambers and n−1n-1n−1 corridors that connect them. For every pair of chambers there is unique way to 阅读全文
posted @ 2020-07-29 16:00 kurum! 阅读(157) 评论(0) 推荐(0) 编辑
摘要: 【原题】 Description Rain has pummeled the cows' field, a rectangular grid of R rows and C columns (1 <= R <= 50, 1 <= C <= 50). While good for the grass, 阅读全文
posted @ 2020-07-24 19:20 kurum! 阅读(135) 评论(0) 推荐(0) 编辑