原题: You are given a string s, consisting of lowercase Latin letters. You are asked q queries about it: given another string t, consisting of lowercase Latin letters, perform the following steps: concatenate s and t; calculate the prefix function...
Educational Codeforces Round 75 (Rated for Div. 2) A~E2 A. Broken Keyboard 链接 #include<bits/stdc++.h>
using namespace std;
int st[30];
int main()
{ int T; cin >> T; while (T--) { string s; cin >> s; for (int i = 0; i <...
Educational Codeforces Round 130 (Rated for Div. 2) A. Parkway Walk 题目描述 求走完所有距离所需最小的补充能量数 题目分析 用所需总能量数减去初始能量即可 code #include<bits/stdc++.h> using namespace std; int n, m, k, t; void solve()
{ int sum...
?好久没打cf了,这两天一直配linux,写django,脑子都麻了 过几天补补题康复一下 目录 A. Make it Beautiful B. Matrix of Differences C. Yet Another Tournament D. Different Arrays E. Game of the Year ? A. Make it Beautiful 首先数组是排好序的 这...
You are given an array a1,a2,…,an, which is sorted in non-descending order. You decided to perform the following steps to create array b1,b2,…,bn Create an array d consisting of n arbitrary non-negative integers.Set bi=ai+di for each bi.Sort th...
原题: You are given a string s, consisting of lowercase Latin letters. You are asked q queries about it: given another string t, consisting of lowercase Latin letters, perform the following steps: concatenate s and t; calculate the prefix function...
A Find The Array 题意 给你一个 a a a数组,这个数组是好的当且仅当这个数组的元素为1或者 a i a_i ai?-1、 a i a_i ai?-2在数组中出现过。给你一个数组和 s s s,问数组最小多长就可以满足数组和为 s s s。 s < = 1 e 3 s<=1e3 s<=1e3 思...