Codeforces828 C. String Reconstruction
来源:互联网 发布:mysql默认事务隔离级别 编辑:程序博客网 时间:2024/05/29 18:06
#include <iostream>#include <cstdio>#include <cstring>#include <string>#include <algorithm>#include <cmath>#include <map>#include <set>#include <stack>#include <queue>#include <vector>#include <bitset>using namespace std;#define LL long longconst int INF = 0x3f3f3f3f;#define MAXN 500char s[2000006];char ch[2000005];int main(){ int n,m,x; int tot=0; scanf("%d",&n); for(int i=0; i<n; i++) { scanf("%s%d",&ch,&m); int k=strlen(ch); int t=-INF; for(int j=0; j<m; j++) { scanf("%d",&x); x--; tot=max(x+k,tot); for(int l=max(x,t); l<x+k; l++) s[l]=ch[l-x]; t=x+k; } } for(int i=0; i<tot; i++) if(s[i]=='\0') printf("a"); else printf("%c",s[i]); printf("\n"); return 0;}
阅读全文
0 0
- Codeforces828 C. String Reconstruction
- Codeforces828 C. String Reconstruction
- CodeForces 828C String Reconstruction
- Codeforces 828 C String Reconstruction
- codeforces 828C. String Reconstruction
- CF 423 C : String Reconstruction
- Codeforces #423-Div. 2-C. String Reconstruction
- Codeforces Round #423 C. String Reconstruction
- Codeforces 828 C. String Reconstruction 思维
- CodeForces 828C String Reconstruction(思维)
- Codeforces Round #423 C. String Reconstruction
- VK CUP 2017 C String Reconstruction
- CF 828C String Reconstruction(暴力)
- codeforces 828 c String Reconstruction(扫描线+string)
- Codeforces Round #423 (Div. 2) C. String Reconstruction(字符串)
- Codeforces Round #423 (Div. 2) C. String Reconstruction
- Codeforces 828C String Reconstruction【思维+并查集】
- Codeforces #848C: String Reconstruction 题解之花样虐题
- 欢迎使用CSDN-markdown编辑器
- 提取斗鱼直播源的图文教程
- jupyter notebook 配置多anaconda/python不同版本 可以轻松切换python内核
- 排序之直接插入排序
- Android 打码走江湖 之 天下第一帮 Fragment的前世今生(上)
- Codeforces828 C. String Reconstruction
- ButterKnife中如何绑定头View和脚View
- CSS颜色 尺寸 字体属性 文本属性
- 阿里搜索业务容器化中的一些经验和思考
- 使用myeclipse创建maven项目
- JVM性能调优
- ultraedit 使用
- Centos7 设置时区
- SQL 语句:基础