随笔分类 - 模拟
摘要:##题目传送门 ##分析 考虑N最多取6的话,dfs暴力和直接贪心模拟都是可以过的 思路: 1.首先判断在起点和各个加油站是否能到达下一个加油站或终点 2.考虑每到一个加油站为一个状态,首先要找到当前状态能到达的加油站有哪些 3.在能到达的加油站中,如果有油费小于当前加油站的,直接加刚好能到那个加油
阅读全文
摘要:###题面 Pavel and Triangles 题面翻译 给定n种木棍,第i+1种有ai个,长度为2^i,求用这些木棍可以同时拼出多少个三角形(不可重复使用同一根) 输入第一行n,第二行n个整数a0,a1,a2...an−1 n≤3∗10^5,0≤ai≤10^9 输出一个整数表示个数 题目描述
阅读全文
摘要:##题面 You are given an array a consisting of n integers numbered from 1 to n. Let’s define the k-amazing number of the array as the minimum number that
阅读全文
摘要:##题面 Eugene likes working with arrays. And today he needs your help in solving one challenging task. An array cc is a subarray of an array bb if cc ca
阅读全文
摘要:##题面 Dark is going to attend Motarack’s birthday. Dark decided that the gift he is going to give to Motarack is an array a of n non-negative integers.
阅读全文
摘要:##题面 A sequence a=[a1,a2,…,al] of length l has an ascent if there exists a pair of indices (i,j) such that 1≤i<j≤l and ai<aj. For example, the sequenc
阅读全文
摘要:###题面 Now that Kuroni has reached 10 years old, he is a big boy and doesn't like arrays of integers as presents anymore. This year he wants a Bracket
阅读全文
摘要:##Codeforces Round #620(Div.2) Longest Palindrome ###题面 Returning back to problem solving, Gildong is now studying about palindromes. He learned that
阅读全文