集训队每周一赛2020-03-13(构造+找规律+字符串+并查集)

ABAP代码检查(Code Review) 1、SLIN 扩展程序检查 也可通过(SE38工具栏->检查-扩展程序检查) 进入 2、ATC 检查 通过<SE38菜单栏-检查-ABAP测试主控室> 或事物代码SCI, 支持自定义检查变式 SCI可以配置检查变式满足特殊需求,配置对象集用于批量检查 3、通过ABAP测试主控室实现统一管理,定期检查作业和监控功能(事务代码ATC) 参考 SLIN... 阅读详情

A 飞

Gym 102416C

传送门.

Let’s say we would like to give change of d dollars after a puchase of coffee. The only coins that we can use have values a, a+1, …, b. Is it possible to give out the change? We are interested in even harder quesion: for given d and a what is the smallest b such that the change can be given?

Input

The input is two numbers 1≤a≤d≤109.

Output

Print smallest b such that d is a sum of coins from range a,…,b.

Examples

Input
19 60
Output
20
Input
100 914
Output
102

题解

#include<stdio.h>
#include<math.h>
int main()
{
	int d,i,a,n,v;
	scanf("%d%d",&a,&d);
	n=d/a;
	v=d%a;
	i=ceil(1.0*v/n);
	printf("%d\n",a+i);		
	return 0;
}

B 流

传送门.

CodeForces 1316B

Vasya has a string s of length n. He decides to make the following modification to the string:
Pick an integer k, (1≤k≤n).
For i from 1 to n−k+1, reverse the substring s[i:i+k−1] of s. For example, if string s is qwer and k=2, below is the series of transformations the string goes through:
qwer (original string)
wqer (after reversing the first substring of length 2)
weqr (after reversing the second substring of length 2)
werq (after reversing the last substring of length 2)
Hence, the resulting string after modifying s with k=2 is werq.
Vasya wants to choose a k such that the string obtained after the above-mentioned modification is lexicographically smallest possible among all choices of k. Among all such k, he wants to choose the smallest one. Since he is busy attending Felicity 2020, he asks for your help.
A string a is lexicographically smaller than a string b if and only if one of the following holds:
a is a prefix of b, but a≠b;
in the first position where a and b differ, the string a has a letter that appears earlier in the alphabet than the corresponding letter in b.

Input

Each test contains multiple test cases.
The first line contains the number of test cases t (1≤t≤5000). The description of the test cases follows.
The first line of each test case contains a single integer n (1≤n≤5000) — the length of the string s.
The second line of each test case contains the string s of n lowercase latin letters.
It is guaranteed that the sum of n over all test cases does not exceed 5000.

Output

For each testcase output two lines:
In the first line output the lexicographically smallest string s′ achievable after the above-mentioned modification.
In the second line output the appropriate value of k (1≤k≤n) that you chose for performing the modification. If there are multiple values of k that give the lexicographically smallest string, output the smallest value of k among them.

Example

Input
6
4
abab
6
qwerty
5
aaaaa
6
alaska
9
lfpbavjsm
1
p
Output
abab
1
ertyqw
3
aaaaa
1
aksala
6
avjsmbpfl
5
p
1

Note

In the first testcase of the first sample, the string modification results for the sample abab are as follows :
for k=1 : abab
for k=2 : baba
for k=3 : abab
for k=4 : baba
The lexicographically smallest string achievable through modification is abab for k=1 and 3. Smallest value of k needed to achieve is hence 1.

题解

#include<iostream> 
#include<algorithm>
#include<string>
using namespace std;
string a,b,c,s,x;
int main()
{
    int t,n,i,ans;
    cin>>t;
    while(t--)
    {
        cin>>n;
        cin>>a;
        x=a;
        ans = 1;
        for(i=1; i<=n; i++) 
		{
            b=a.substr(0,i-1);
            c=a.substr(i-1,n-i+1);
            if((n-i)%2==0) 
			reverse(b.begin(),b.end());
            s=c+b;
            if(x>s)
			{
                x=s;
                ans=i;
            }
        }
        cout<<x<<endl;
        cout<<ans<<endl;
    }
    return 0;
}

C 直

Gym 102535G

传送门

Dr. Evil is up to his evil antics again and has traveled back in time to 1975 to enact his evil schemes. The British Intelligence Agency needs someone to travel back in time as well to thwart his convoluted plot. Seeing the opportunity to be part of an adventure that involves riveting mysteries, amorous escapades, and gratuitous violence, you volunteer for the role of 007.
What the British Intelligence Agency failed to tell you was that in this iteration, not only will you be agent 007. You will also be 007 years old and do 007-year-old things. As part of your role, you will receive encrypted messages with a secret marker and you have to decode whether it’s meant for Agent 003, Agent 005, or Agent 007 (you). The marker will be divisible by 3 if it’s meant for Agent 003, divisible by 5 if it’s meant for Agent 005, and 7 if it’s meant for Agent 007.
Since you retained your mental maturity, you want to avoid doing tedious tasks equivalent to homework for 007-year-olds. You want to leave it to a computer to do the job.
The program you write must accept a number m (the secret marker) and output AGENT 003 if it’s divisible by 3, AGENT 005 if it’s divisible by 5, and AGENT 007 if it’s divisible by 7.

Input

The first line of input contains a single integer t, the number of test cases.
Each test case consists of a single line containing a single integer, m.
Constraints
1≤t≤105
1≤m≤1018

Output

For each test case, output several lines. For each agent the message is meant for—AGENT 003, AGENT 005, and/or AGENT 007—output the agent’s name in a single line. If the message is meant for none of you, output NONE. If the message is meant for more than one of you, output each agent in the following order: AGENT 003, AGENT 005, and/or AGENT 007. At the end of the output for each test case, output a single line containing three dashes: —

Example

Input
7
42
420
111
1111
2020
489
123456789012345678
Output
AGENT 003
AGENT 007
—
AGENT 003
AGENT 005
AGENT 007
—
AGENT 003
—
NONE
—
AGENT 005
—
AGENT 003
—
AGENT 003
—

题解

#include<stdio.h>
typedef long long ll;
int main()
{
	ll t,m,cnt;
	scanf("%lld",&m);
	while(m--)
	{
		cnt=0;
		scanf("%lld",&t);
		if(t%3==0)
		{
			printf("AGENT 003\n");cnt++;			
		}
		if(t%5==0||t%10==0)
		{
			printf("AGENT 005\n");cnt++;
		}		
		if(t%7==0)
		{
			printf("AGENT 007\n");cnt++;
		}
		if(cnt==0)	printf("NONE\n");	
		printf("---");
		if(m) printf("\n");
	}
	return 0;
}

D 下

CodeForces 1312C

传送门

Suppose you are performing the following algorithm. There is an array v1,v2,…,vn filled with zeroes at start. The following operation is applied to the array several times — at i-th step (0-indexed) you can:
either choose position pos (1≤pos≤n) and increase vpos by ki;
or not choose any position and skip this step.
You can choose how the algorithm would behave on each step and when to stop it. The question is: can you make array v equal to the given array a (vj=aj for each j) after some step?

Input

The first line contains one integer T (1≤T≤1000) — the number of test cases. Next 2T lines contain test cases — two lines per test case.
The first line of each test case contains two integers n and k (1≤n≤30, 2≤k≤100) — the size of arrays v and a and value k used in the algorithm.
The second line contains n integers a1,a2,…,an (0≤ai≤1016) — the array you’d like to achieve.

Output

For each test case print YES (case insensitive) if you can achieve the array a after some step or NO (case insensitive) otherwise.

Example

Input
5
4 100
0 0 0 0
1 2
1
3 4
1 4 1
3 2
0 1 3
3 9
0 59049 810
Output
YES
YES
NO
NO
YES

Note

In the first test case, you can stop the algorithm before the 0-th step, or don’t choose any position several times and stop the algorithm.
In the second test case, you can add k0 to v1 and stop the algorithm.
In the third test case, you can’t make two 1 in the array v.
In the fifth test case, you can skip 90 and 91, then add 92 and 93 to v3, skip 94 and finally, add 95 to v2.

题解

E 三

CodeForces 1316A

传送门

n students are taking an exam. The highest possible score at this exam is m. Let ai be the score of the i-th student. You have access to the school database which stores the results of all students.
You can change each student’s score as long as the following conditions are satisfied:
All scores are integers
0≤ai≤m
The average score of the class doesn’t change.
You are student 1 and you would like to maximize your own score.
Find the highest possible score you can assign to yourself such that all conditions are satisfied.

Input

Each test contains multiple test cases.
The first line contains the number of test cases t (1≤t≤200). The description of the test cases follows.
The first line of each test case contains two integers n and m (1≤n≤103, 1≤m≤105) — the number of students and the highest possible score respectively.
The second line of each testcase contains n integers a1,a2,…,an (0≤ai≤m) — scores of the students.

Output

For each testcase, output one integer — the highest possible score you can assign to yourself such that both conditions are satisfied._

Example

Input
2
4 10
1 2 3 4
4 5
1 2 3 4
Output
10
5

Note

In the first case, a=[1,2,3,4], with average of 2.5. You can change array a to [10,0,0,0]. Average remains 2.5, and all conditions are satisfied.
In the second case, 0≤ai≤5. You can change a to [5,1,1,3]. You cannot increase a1 further as it will violate condition 0≤ai≤m.

题解

#include<stdio.h>
int main()
{
	int i,t,m,n,sum,a[1005];
	scanf("%d",&t);
	while(t--)
	{
		sum=0;
		scanf("%d%d",&n,&m);
		for(i=0;i<n;i++)
		{
			scanf("%d",&a[i]);
			sum+=a[i];
		}	
		if(sum>m)
		printf("%d\n",m);
		else printf("%d\n",sum);
	}
	return 0;
}

F 千

Gym 102501B

传送门

Alicia has a huge garden which is the habitat of many animals that she really cares about. After listening to a podcast about biodiversity, she becomes very concerned about the balance between species in her garden. She wants to know if there is a species that could overtake the others. In order to do so, she decides to carry out a census of all animals in the garden, writing down the species of each of them. Can you help her checking if there is strictly more animals from one species than the animals from all other species together?

Input

The input consists of the following lines:
on the first line: an integer N;
on each of the next N lines: the species of an animal as a string of length at most 20, containing only ASCII alphanumeric characters.
Limits
1≤N≤2×105.

Output

A string that appears a number of times that is greater than the sum of the others, if there is any, or the string “NONE” otherwise.

Examples

Input
3
frog
fish
frog
Output
frog
Input
4
cat
mouse
mouse
cat
Output
NONE

题解

#include<iostream>
#include<map>
using namespace std;
map<string,int> a;
string s,ans;
int main()
{
    int n,max=0;
    cin>>n;
    for(int i=0; i<n; i++)
    {
        cin>>s;
        a[s]+=1;
        if(max<a[s])
        {
            max=a[s];
            ans=s;
        }
    }
    if(max>n-max)
        cout<<ans;
    else
        cout<<"NONE";
    return 0;
}

G 迟

CodeForces 893C

传送门

Vova promised himself that he would never play computer games… But recently Firestorm — a well-known game developing company — published their newest game, World of Farcraft, and it became really popular. Of course, Vova started playing it.
Now he tries to solve a quest. The task is to come to a settlement named Overcity and spread a rumor in it.
Vova knows that there are n characters in Overcity. Some characters are friends to each other, and they share information they got. Also Vova knows that he can bribe each character so he or she starts spreading the rumor; i-th character wants c i gold in exchange for spreading the rumor. When a character hears the rumor, he tells it to all his friends, and they start spreading the rumor to their friends (for free), and so on.
The quest is finished when all n characters know the rumor. What is the minimum amount of gold Vova needs to spend in order to finish the quest?
Take a look at the notes if you think you haven’t understood the problem completely.

Input

The first line contains two integer numbers n and m (1 ≤ n ≤ 105, 0 ≤ m ≤ 105) — the number of characters in Overcity and the number of pairs of friends.
The second line contains n integer numbers c i (0 ≤ c i ≤ 109) — the amount of gold i-th character asks to start spreading the rumor.
Then m lines follow, each containing a pair of numbers ( x i, y i) which represent that characters x i and y i are friends (1 ≤ x i, y i ≤ n, x i ≠ y i). It is guaranteed that each pair is listed at most once.

Output

Print one number — the minimum amount of gold Vova has to spend in order to finish the quest.

Examples

Input
5 2
2 5 3 4 8
1 4
4 5
Output
10
Input
10 0
1 2 3 4 5 6 7 8 9 10
Output
55
Input
10 5
1 6 2 7 3 8 4 9 5 10
1 2
3 4
5 6
7 8
9 10
Output
15

Note

In the first example the best decision is to bribe the first character (he will spread the rumor to fourth character, and the fourth one will spread it to fifth). Also Vova has to bribe the second and the third characters, so they know the rumor.
In the second example Vova has to bribe everyone.
In the third example the optimal decision is to bribe the first, the third, the fifth, the seventh and the ninth characters.

题解

#include<stdio.h>
#define ll long long
#define max(a,b) a>b?a:b
#define min(a,b) a<b?a:b
ll fa[100005],c[100005];
ll find(ll x)
{
	if(fa[x]==x)
		return x;
	else
		return fa[x]=find(fa[x]);
}
void merge(ll a,ll b)
{
	ll af=find(a);
	ll bf=find(b);
	if(af!=bf)
	fa[max(af,bf)]=min(af,bf);
	c[min(af,bf)]=min(c[af],c[bf]);
	return;
}
int main()
{
	ll m,n,a,b,ans=0;
	scanf("%lld%lld",&n,&m);
	for(ll i=1; i<=n; i++)
	{
		fa[i]=i;
		scanf("%lld",&c[i]);
	}
	for(ll i=0; i<m; i++)
	{
		scanf("%lld%lld",&a,&b);
		merge(a,b);
	}
	for(ll i=1; i<=n; i++)
	{
		if(fa[i]==i)
			ans+=c[i];
	}
	printf("%lld",ans);
	return 0;
}

H !

CodeForces 731C

传送门

SAP公司间外协业务流程以及配置说明 阅读详情

相关推荐

Ubuntu系统下STM32开发环境搭建:从零配置CubeMX、VSCode与OpenOCD调试实战

本文详细介绍了在Ubuntu系统下搭建STM32开发环境的完整流程,包括CubeMX、VSCode和OpenOCD的安装配置。通过实战教程指导开发者从基础环境准备到工程创建与调试,提供高效的嵌入式开发解决方案,并分享常见问题解决方法。

potato的博客 949

RedShift 数据库报错总结(一)Only ASCII characters are allowed in fixed length strings

这个错误会出现在Insert文中,也会出现在查询文中。 我遇到的报错的详细信息为: error:Invalid Characters: code:*** context:Only ASCII characters are allowed in fixed length strings. Invalid ASCII char: ** ** ** query:**** location:****...

weixin_39408986的博客 2340

XGBoost的简单安装及入门使用

XGBoost安装及简单入门 XGBoost支持多种操作系统,如Windows, Linux, MacOS等,并支持多种语言版本,如Python, R, Scale, Java等。XGBoost的安装方式一般有两种,一种是直接通过pip安装(适合用于Python),另外一种是通过源码编译安装 1、通过pip安装 通过pip安装Python包既简单又方便,只需执行如下的命令: pip install -i https://pypi.tuna.tsinghua.edu.cn/simple xgboost 使用

qq_41513230的博客 3万+

中文代码示例教程之Angular尝试

为了检验中文命名在Angular中的支持程度, 把Angular官方入门教程的示例代码中尽量使用了中文命名. 以下源码库在此. 创建项目 不支持中文命名: $ ng new 英雄榜 Project name "英雄榜" is not valid. New project names must start with a letter, and must contain only alphanumer...

中文编程 945

HFSS 3D LAOUT PCB 裁剪,差分线,过孔仿真和优化

我本身不是做天线设计的,所以HFSS这个软件给我主要还是做PCB级别的高速信号完整性仿真,一般2.5D的仿真软件无法对过孔和跨平面进行仿真。所以要借助三维电磁软件进行。今天就针对PCB进行裁剪。为什么要裁剪?以为如果把整个PCB一起仿真的话,应该要好几个月吧。所以为了加快仿真速度,必须进行裁剪仿真。①candence的PCB可以直接导入。那么先导入brd文件,file-import-candence结果如下②点击cutout,选中要仿真的net和参考平面。这里最好选creat new不然会把原文件覆盖掉。注

gjatwfn的专栏 1万+

C#上位机通信层封装:西门子S7NetPlus库的优雅使用

支持S7-1200/1500(机架号0,槽号1)、S7-300/400(机架号/槽号需根据实际配置);支持位(Bit)、字节(Byte)、字(Word)、双字(DWord)、浮点数(Float/Double)等数据类型的读写;支持DB块、输入寄存器(I)、输出寄存器(Q)、内存寄存器(M)、定时器(T)、计数器(C)的操作;轻量无依赖,兼容.NET 5+。首先定义核心枚举和常量,统一规范参数类型,避免硬编码。/// 西门子PLC型号(对应不同的机架/槽号默认配置)

这里只有干货:从 Modbus 到 MES,从 YOLO 到工控机部署;65 篇现场排障案例,每篇都写到改哪一行。 1104

Magento安装后无法访问,提示“Illegal scheme supplied, only alphanumeric characters are permitted”

Magento安装后无法访问,提示“Illegal scheme supplied, only alphanumeric characters are permitted”,找到magento\app\code\core\Mage\Core\Model\Store.php,修改下面代码     /**      * Check if request was secure      *

zhengjianqi的专栏 4707

YOLOv13多分支融合机制+SE注意机制 RepVGGBlock_OREPA架构 map提升4.89,召回率提升8.66

本文提出了一种改进的YOLOv13目标检测模型,通过引入RepVGGOREPA模块和重参数化技术,显著提升了模型性能。实验结果表明,采用RepVGGBlock后,mAP提升4.89,召回率提升8.66%。文章详细介绍了模型移植过程,包括创建YOLOv13-REPVGGOREPA配置文件、修改任务处理代码和模块初始化文件,并提供了完整的OREPA模块实现代码。该模块通过多尺度特征融合和SE注意力机制,实现了训练时的丰富表征能力和推理时的高效计算,为YOLO系列模型提供了新的优化思路。

FJN110的博客 2656

报错:Group name must be a valid unicode string containing only ASCII alphanumerics, hyphens, or period

Group name must be a valid unicode string containing only ASCII alphanumerics, hyphens, or period的原因是组名有问题。组名必须是仅包含 ASCII 字母数字、连字符或句点的有效 Unicode 字符串。我本来组名是name = “room %d” % (i)改成name = “room-%d” % (i)...

qq_51343860的博客 875

Linux Namespace隔离实战:dd/mkfs/mount/unshare构建终极沙箱

内存占用 | 512MB+ | **<10MB** | 50倍节省 || 启动时间 | 15-45秒 | **0.1-0.5秒** | 100倍加速 || 磁盘空间 | GB级 | **MB级** | 显著减少 || 系统调用性能 | 有损耗 | **原生速度** | 零损耗 |

Loving_enjoy的博客 408

OpenClaw 性能调优五步法

本文介绍了优化OpenClaw性能的五步方法,将响应时间从3秒降至300毫秒。首先建立性能基线,分析模型加载、上下文检索等主要瓶颈。五步优化包括:1)启用模型缓存减少60%延迟;2)优化记忆检索策略降低25%延迟;3)并行化工具调用节省40%时间;4)智能选择轻量级模型减少50%推理时间;5)启用流式输出改善70%感知延迟。最终整体性能提升10倍,并建议建立持续监控机制。这些优化方法经过实战验证,适用于不同规模的OpenClaw部署场景。

刘一说的IT专栏 1462

四位正整数计数题的数学建模与高效解法

四位正整数是算法竞赛与编程考试中的基础数域概念,指1000至9999之间的9000个离散整数,具有确定的十进制位权结构(千位×1000+百位×100+十位×10+个位)。其核心原理在于数字特征(如各位互异、含特定数字)依赖位分解,而代数特征(如被13整除、模7余0)依赖整体数值,二者耦合于进制表示。掌握该模型可避免暴力枚举导致的超时风险,显著提升计算效率。技术价值体现在将O(N)穷举降为O(1)组合推导或O(k)同余类枚举,广泛应用于蓝桥杯国赛、ACM热身题及企业笔试中的约束计数场景。本文聚焦‘四位正整数’

weixin_33563728的博客 306

MGC3130 3D手势识别传感器原理图设计,已量产(交互传感器)

最近在落地一款互动艺术装置的控制模块,选了 Microchip 的 MGC3130 做核心 —— 这颗芯片算是 GestIC® 近场传感技术的 “熟面孔” 了,把 3D 手势识别、运动跟踪的信号处理都集成在一颗芯片里,0-10cm 的检测距离刚好适配桌面级互动场景,挥挥手就能控设备的体验,放在艺术装置里确实很出效果。今天扒一下实际跑通的原理图,聊聊每个模块的设计思路。

不脱发的程序猿 406

四位正整数的数学建模:从暴力枚举到组合计数与同余求解

四位正整数是编程竞赛与算法工程中典型的结构化数字模型,其本质是十进制位权表达式 N = 1000a + 100b + 10c + d(a∈[1,9], b,c,d∈[0,9])。理解该结构是掌握数字约束推理、组合计数和模运算的前提。在蓝桥杯等高水平赛事中,题目表面考察Python实现,实则检验对数论原理、变量耦合性与计算经济性的深层把握。通过隔板法求解数字和约束、利用位权替代字符串操作、应用中国剩余定理处理末位同余等技术,可将O(10⁴)暴力搜索降维至O(1)数学推导。这类思维广泛适用于验证码生成、防篡改编

weixin_29895109的博客 287

温度PID控制PLC程序

温度PID稳定控制程序,适用于欧姆龙PLC,对其他PLC也具有很大参考价值

计算机控制技术及应用

《计算机控制技术及应用》通过总结作者的科研成果和吸收国内外的先进理论、方法和技术,以计算机控制系统的网络化、开放化、智能化和集成化发展趋势为主线索,主要介绍计算机控制系统的基本概念和计算机控制系统的典型形式,计算机控制系统的数学描述与基本分析方法,以及数字PID控制器、最少拍控制系统、达林算法、状态变量设计法等设计方法及其各种改进算法。重点突出计算机控制系统输入输出通道接口的设计方法和典型控制系统的设计案例与实现方法等。

windows环境下创建一个Angular2项目

说明:本文已经默认安装了node.js、Angular2。同时使用了cnpm镜像。如果没有安装的话,大家可以去看一下大漠穷秋老师的新手视频。(优酷里面就有) 第一步,项目路径 第二步,创建项目 第三步,手动安装Angular2依赖包

maomaolaoshi的博客 1371

Data-Structures-and-Algorithm-Analysis-in-Java.pdf

作者: Weiss, Mark A. 出版社: Addison Wesley Data Structures and Algorithm Analysis in Java is an “advanced algorithms” book that fits between traditional CS2 and Algorithms Analysis courses. In the old ACM Curriculum Guidelines, this course was known as CS7. This text is for readers who want to learn good programming and algorithm analysis skills simultaneously so that they can develop such programs with the maximum amo...

cookie中不能包含的特殊字符

昨天有客户投诉,说其购买的关键字: 钻石珠宝,diy    不能正常看到对应的广告位,查了下网站对应的广告投放记录是正常的。         最后确认是,searchweb在记录对应的用户最近搜索关键字cookie时,因为特殊字符违反了cookie的规范,导致最近搜索记录里没有用户上一 次搜索钻石珠宝,diy的记录。     对应javaapi中cookie规范描述: ...

agapple 2037

霍尼韦尔SoftMaster使用说明

霍尼韦尔SoftMaster使用说明

Magento错误 Illegal scheme supplied, only alphanumeric characters are permitted

1.检查表core_config_data 'web/unsecure/base_url' 和'web/secure/base_url' 的值是否是正确的链接地址2.删除系统目录var下所有子目录及文件(缓存信息)3.刷新浏览器参考:Illegal scheme supplied, only alphanumeric characters are permittedIllegal scheme s...

weixin_33831673的博客 400

清理搜狗输入法_清理输入内容:避免安全性和可用性灾难

清理搜狗输入法 介绍 (Introduction) In any application, we will likely have some need to control input data, either altering, filtering or otherwise changing text to fit our application’s needs. 在任何应用程序中,...

culuo4781的博客 1361

Codeforces Round #705 (Div. 2) C. K-beautiful Strings(思维 枚举)

题目链接:https://codeforces.com/contest/1493/problem/C You are given a string ss consisting of lowercase English letters and a number kk. Let’s call a string consisting of lowercase English letters beautiful if the number of occurrences of each letter in that

Sankkl1的博客 416

Codeforce 1312C - Adding Powers (模拟,思维)

Codeforce 1312C Adding Powers 题目: Suppose you are performing the following algorithm. There is an array v1,v2,…,vn filled with zeroes at start. The following operation is applied to the array severa...

weixin_45691686的博客 400

String Modification CodeForces - 1316B(规律)

Vasya has a string s of length n. He decides to make the following modification to the string: Pick an integer k, (1≤k≤n). For i from 1 to n−k+1, reverse the substring s[i:i+k−1] of s. For example, if...

starlet_kiss的博客 477

Codeforce-CodeCraft-20 (Div. 2)-B. String Modification (找规律+模拟)

Vasya has a string s of length n. He decides to make the following modification to the string: Pick an integer k, (1≤k≤n). For i from 1 to n−k+1, reverse the substring s[i:i+k−1] of s. For example, if...

日拱一卒,功不唐捐 2883

A. Grade Allocation

time limit per test 1 second memory limit per test 256 megabytes input standard input output standard output nnstudents are taking an exam. The highest possible score at this exam ismm. Let...

无知的我 729

String Modification CodeForces - 1316B (找规律)

题目链接 Vasya has a string s of length n. He decides to make the following modification to the string: Pick an integer k, (1≤k≤n). For i from 1 to n−k+1, reverse the substring s[i:i+k−1] of s. For examp...

xqx_Zi_yu 393

CodeCraft-20 B. String Modification

Vasya has a stringssof lengthnn. He decides to make the following modification to the string: Pick an integerkk, (1≤k≤n1≤k≤n). Foriifrom11ton−k+1n−k+1, reverse the substrings[i:i+k−1]s[i:i...

★探梦少年☆的博客 308

CodeCraft-20 (Div. 2)A.Grade Allocation

A. Grade Allocation time limit per test1 second memory limit per test256 megabytes inputstandard input outputstandard output n students are taking an exam. The highest possible score at this exam is m...

菜鸡的学习记录 529
上一篇: 牛客每日一练5.19--NC14266+NC14661(模拟+队列)
下一篇: 集训队每周一赛2020-03-22(思维+概率+错排)
带你看宇宙
博客等级 码龄7年 20粉丝 34原创
评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

个

红包个数最小为10个

元

红包金额最低5元

当前余额3.43元 前往充值 >
需支付:10.00元
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付元
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值