题目链接:900C Remove Extra One 题意: 首先record是指这个数比数列前面的所有数都大,给了n个数(1-n),删掉一个数,让整个数列的record值达到最大. 题解: 刚开始我的思路是求这个数列中前面比这个数大的有几个(因为只有前面只有一个数大于这个数的数可以增加record值)求出后找比求出个数为1的数大的最近数.后来发现这中方法代码量实在太大了,而且在求出后再求最近的大于这个数的数的复杂度也好像不够. 后来看了题解,发现只要换一种思路就很简单,那就是求删除某个位置上的…
You are given a permutation p of length n. Remove one element from permutation to make the number of records the maximum possible. We remind that in a sequence of numbers a1, a2, ..., ak the element ai is a record if for every integer j (1 ≤ j < i) t…
C. Remove Extra One time limit per test 2 seconds memory limit per test 256 megabytes input standard input output standard output You are given a permutation p of length n. Remove one element from permutation to make the number of records the maximum…
A. Alyona and copybooks time limit per test: 1 second memory limit per test: 256 megabytes input: standard input output: standard output Little girl Alyona is in a shop to buy some copybooks for school. She study four subjects so she wants to have eq…
A. Crazy Computer time limit per test 2 seconds memory limit per test 256 megabytes input standard input output standard output ZS the Coder is coding on a crazy computer. If you don't type in a word for a c consecutive seconds, everything you typed…