随笔分类 - 其他 构造
摘要:C. Messy You are fed up with your messy room, so you decided to clean it up. Your room is a bracket sequence s=s1s2…sn of length n. Each character of
阅读全文
摘要:B2. Character Swap (Hard Version) This problem is different from the easy version. In this version Ujan makes at most 2𝑛 swaps. In addition, 𝑘≤1000,
阅读全文
摘要:F. Equalizing Two Strings You are given two strings s and t both of length n and both consisting of lowercase Latin letters. In one move, you can choo
阅读全文
摘要:F. Tree Factory Bytelandian Tree Factory produces trees for all kinds of industrial applications. You have been tasked with optimizing the production
阅读全文
摘要:D. Magic Breeding link http://codeforces.com/contest/878/problem/D description Nikita and Sasha play a computer game where you have to breed some magi
阅读全文
摘要:D. High Load 题目连接: http://codeforces.com/contest/828/problem/D Description Arkady needs your help again! This time he decided to build his own high sp
阅读全文
摘要:D. Artsem and Saunders 题目连接: http://codeforces.com/contest/765/problem/D Description Artsem has a friend Saunders from University of Chicago. Saunders
阅读全文
摘要:E. Dasha and Puzzle 题目连接: http://codeforces.com/contest/761/problem/E Description Dasha decided to have a rest after solving the problem. She had been
阅读全文
摘要:C. Vladik and fractions 题目链接 http://codeforces.com/contest/743/problem/C 题面 Vladik and Chloe decided to determine who of them is better at math. Vladi
阅读全文
摘要:A. Alyona and mex 题目连接: http://codeforces.com/contest/739/problem/A Description Alyona's mother wants to present an array of n non negative integers t
阅读全文
摘要:A. Drazil and Factorial 题目连接: http://codeforces.com/contest/516/problem/A Description Drazil is playing a math game with Varda. Let's define for posit
阅读全文
摘要:B. Recover the String 题目连接: http://www.codeforces.com/contest/708/problem/B Description For each string s consisting of characters '0' and '1' one can
阅读全文
摘要:3101: N皇后 题目连接: http://www.lydsy.com/JudgeOnline/problem.php?id=3101 Description n n的棋盘,在上面摆下n个皇后,使其两两间不能相互攻击…. Input 一个数n Output 第i行表示在第i行第几列放置皇后 Sam
阅读全文
摘要:D. Dreamoon and Sets 题目连接: http://www.codeforces.com/contest/476/problem/D Description Dreamoon likes to play with sets, integers and . is defined as
阅读全文
摘要:Elegant Construction 题目连接: http://acm.hdu.edu.cn/showproblem.php?pid=5813 Description Being an ACMer requires knowledge in many fields, because proble
阅读全文
摘要:2045. Richness of words 题目连接: http://acm.timus.ru/problem.aspx?space=1&num=2045 Description For each integer i from 1 to n, you must print a string si
阅读全文
摘要:2037. Richness of binary words 题目连接: http://acm.timus.ru/problem.aspx?space=1&num=2037 Description For each integer i from 1 to n, you must print a st
阅读全文
摘要:Longest Increasing Subsequences 题目连接: https://www.codechef.com/SNCKPA16/problems/MAKELIS Description 大厨最近了解了经典的最长上升子序列问题。然而,大厨发现,虽然最长上升子序列的长度 是唯一的,但子序
阅读全文
摘要:D. Bear and Two Paths 题目连接: http://www.codeforces.com/contest/673/problem/D Description Bearland has n cities, numbered 1 through n. Cities are connec
阅读全文
摘要:B. Fox and Minimal path 题目连接: http://codeforces.com/contest/388/problem/B Description Fox Ciel wants to write a task for a programming contest. The ta
阅读全文