#define HAVE_STRUCT_TIMESPEC
#include<bits/stdc++.h>
using namespace std;
string s[][];
int ans[][];
int num[];
string t;
int main(){
ios::sync_with_stdio(false);
cin.tie(NULL);
cout.tie(NULL);
for(int i=;i<=;++i)
for(int j=;j<=;++j)
cin>>s[i][j];
cin.ignore();
getline(cin,t);
int cnt=,cnt2=;
for(int i=;i<t.size();++i){
if(t[i]>='A'&&t[i]<='Z'){
ans[cnt][++cnt2]=t[i]-'A'+;
if(i==t.size()-)
num[cnt]=cnt2;
}
else{
num[cnt]=cnt2;
if(cnt2>)
++cnt;
cnt2=;
if(i==t.size()-)
--cnt;
}
}
for(int i=;i<=cnt;++i){
for(int k=;k<=;++k){
for(int j=;j<=num[i];++j){
cout<<s[ans[i][j]][k];
if(j<num[i])
cout<<" ";
}
if(k<)
cout<<"\n";
}
if(i<cnt)
cout<<"\n\n";
}
return ;
}

2019冬季PAT甲级第一题的更多相关文章

  1. 2019冬季PAT甲级第二题

    #define HAVE_STRUCT_TIMESPEC #include<bits/stdc++.h> using namespace std; typedef struct{ int ...

  2. 2019冬季PAT甲级第四题

    #define HAVE_STRUCT_TIMESPEC #include<bits/stdc++.h> using namespace std; typedef struct node{ ...

  3. 2019冬季PAT甲级第三题

    #define HAVE_STRUCT_TIMESPEC #include<bits/stdc++.h> using namespace std; ]; ]; ]; int main(){ ...

  4. 2019秋季PAT甲级_备考总结

    2019 秋季 PAT 甲级 备考总结 在 2019/9/8 的 PAT 甲级考试中拿到了满分,考试题目的C++题解记录在这里,此处对备考过程和考试情况做一个总结.如果我的方法能帮助到碰巧点进来的有缘 ...

  5. 2019秋季PAT甲级_C++题解

    2019 秋季 PAT (Advanced Level) C++题解 考试拿到了满分但受考场状态和知识水平所限可能方法不够简洁,此处保留记录,仍需多加学习.备考总结(笔记目录)在这里 7-1 Fore ...

  6. 1080 Graduate Admission——PAT甲级真题

    1080 Graduate Admission--PAT甲级练习题 It is said that in 2013, there were about 100 graduate schools rea ...

  7. PAT 甲级真题题解(1-62)

    准备每天刷两题PAT真题.(一句话题解) 1001 A+B Format  模拟输出,注意格式 #include <cstdio> #include <cstring> #in ...

  8. PAT甲级 链表题_C++题解

    链表处理 PAT (Advanced Level) Practice 链表题 目录 <算法笔记> 重点摘要:静态链表 1032 Sharing (25) 1052 Linked List ...

  9. PAT甲级 排序题_C++题解

    排序题 PAT (Advanced Level) Practice 排序题 目录 <算法笔记> 6.9.6 sort()用法 <算法笔记> 4.1 排序题步骤 1012 The ...

随机推荐

  1. C++——指针2-指向数组的指针和指针数组

    7.4 指向数组元素的指针 声明与赋值 例:int a[10], *pa; pa=&a[0]; 或 pa=a[p1] ; 通过指针引用数组元素,经过上述声明及赋值后: *pa就是a[0],*( ...

  2. [POI2005]KOS-Dicing (最大流+二分)lg3425

    题面https://www.luogu.org/problemnew/show/P3425 题面说赢的最多的人最少赢几场,肯定是向二分的方向思考 建立源点向每一场比赛连容量为1的边,从每场比赛向参赛两 ...

  3. 【网页浏览】国内伪P站搜图网站

    蛮好用的国内p站搜图网站(伪p站) 传送链接

  4. 训练20191009 2018-2019 ACM-ICPC, Asia East Continent Finals

    2018-2019 ACM-ICPC, Asia East Continent Finals 总体情况 本次训练共3小时20分钟,通过题数4. 解题报告 D. Deja vu of - Go Play ...

  5. (转)java垃圾回收二

    转自:http://shuaijie506.iteye.com/blog/1779651 在网上看到一篇不错的文章,记录下来备忘. 要理解java对象的生命周期,我们需要要明白两个问题, 1.java ...

  6. python3练习100题——008

    今天第二道,做了明天就可以休息一下- 原题链接:http://www.runoob.com/python/python-exercise-example8.html 题目:输出 9*9 乘法口诀表. ...

  7. 题解 Fractal Streets

    题目链接 参考博客 #include<cstdio> #include<math.h> #include<utility>//pair using namespac ...

  8. [AST Babel Plugin] Hanlde ArrowFunction && FunctionExpression

    Continue with previous post: https://www.cnblogs.com/Answer1215/p/12342540.html Now we need to think ...

  9. mysql查询速度慢的分析和解决

    一.定位执行慢的sql,如2秒内没执行完的抽取出来 show engines;查看慢查询时间show variables like 'slow%';查看设置多久是慢查询show variables l ...

  10. python面试的100题(5)

    5.现有字典 d= {'a':24,'g':52,'i':12,'k':33}请按value值进行排序? sorted(d.items(),key=lambda x:x[1]) sorted函数 对由 ...