成功掉到灰,真的心太累了,orz!!!!,不是很懂那些国外大佬为什么每次都是20多分钟AK的,QAQ A. Remove Duplicates time limit per test 1 second memory limit per test 256 megabytes input standard input output standard output Petya has an array aa consisting of nn integers. He wants to remove d…
链接: https://codeforces.com/contest/1272/problem/D 题意: You are given an array a consisting of n integers. You can remove at most one element from this array. Thus, the final length of the array is n−1 or n. Your task is to calculate the maximum possib…
A题,题目链接:http://codeforces.com/contest/978/problem/A 解题心得:题意就是让你将这个数列去重,重复的数只保留最右边的那个,最后按顺序打印数列.set+map. #include <bits/stdc++.h> using namespace std; const int maxn = 100; int num[maxn],n; map <int,int> map1,map2; set <int> se; int main(…
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…