Two Merged Sequences 感觉是个垃圾题啊, 为什么过的人这么少.. dp[ i ][ 0 ]表示处理完前 i 个, 第 i 个是递增序列序列里的元素,递减序列的最大值. dp[ i ][ 1 ]表示处理完前 i 个, 第 i 个是递减序列序列里的元素,递增序列的最小值. 然后随便转移转移顺便记录一下路径就好啦. #include<bits/stdc++.h> #define LL long long #define fi first #define se second #de…
Problem Codeforces #550 (Div3) - G.Two Merged Sequences Time Limit: 2000 mSec Problem Description Two integer sequences existed initially, one of them was strictly increasing, and another one — strictly decreasing. Strictly increasing sequence is a…
Rock... Paper! After Karen have found the deterministic winning (losing?) strategy for rock-paper-scissors, her brother, Koyomi, comes up with a new game as a substitute. The game works as follows. A positive integer n is decided first. Both Koyomi a…
今天,开博客,,,激动,第一次啊 嗯,,先来发水题纪念一下 D1. Magic Powder - 1 This problem is given in two versions that differ only by constraints. If you can solve this problem in large constraints, then you can just write a single solution to the both versions. If you fin…
Adieu l'ami. Koyomi is helping Oshino, an acquaintance of his, to take care of an open space around the abandoned Eikou Cram School building, Oshino's makeshift residence. The space is represented by a rectangular grid of n × m cells, arranged into n…
It's hard times now. Today Petya needs to score 100 points on Informatics exam. The tasks seem easy to Petya, but he thinks he lacks time to finish them all, so he asks you to help with one.. There is a glob pattern in the statements (a string consis…
Polycarp watched TV-show where k jury members one by one rated a participant by adding him a certain number of points (may be negative, i. e. points were subtracted). Initially the participant had some score, and each the marks were one by one added…