2019冬季PAT甲级第一题
#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甲级第一题的更多相关文章
- 2019冬季PAT甲级第二题
#define HAVE_STRUCT_TIMESPEC #include<bits/stdc++.h> using namespace std; typedef struct{ int ...
- 2019冬季PAT甲级第四题
#define HAVE_STRUCT_TIMESPEC #include<bits/stdc++.h> using namespace std; typedef struct node{ ...
- 2019冬季PAT甲级第三题
#define HAVE_STRUCT_TIMESPEC #include<bits/stdc++.h> using namespace std; ]; ]; ]; int main(){ ...
- 2019秋季PAT甲级_备考总结
2019 秋季 PAT 甲级 备考总结 在 2019/9/8 的 PAT 甲级考试中拿到了满分,考试题目的C++题解记录在这里,此处对备考过程和考试情况做一个总结.如果我的方法能帮助到碰巧点进来的有缘 ...
- 2019秋季PAT甲级_C++题解
2019 秋季 PAT (Advanced Level) C++题解 考试拿到了满分但受考场状态和知识水平所限可能方法不够简洁,此处保留记录,仍需多加学习.备考总结(笔记目录)在这里 7-1 Fore ...
- 1080 Graduate Admission——PAT甲级真题
1080 Graduate Admission--PAT甲级练习题 It is said that in 2013, there were about 100 graduate schools rea ...
- PAT 甲级真题题解(1-62)
准备每天刷两题PAT真题.(一句话题解) 1001 A+B Format 模拟输出,注意格式 #include <cstdio> #include <cstring> #in ...
- PAT甲级 链表题_C++题解
链表处理 PAT (Advanced Level) Practice 链表题 目录 <算法笔记> 重点摘要:静态链表 1032 Sharing (25) 1052 Linked List ...
- PAT甲级 排序题_C++题解
排序题 PAT (Advanced Level) Practice 排序题 目录 <算法笔记> 6.9.6 sort()用法 <算法笔记> 4.1 排序题步骤 1012 The ...
随机推荐
- 码云项目克隆至github
个人博客 地址:http://www.wenhaofan.com/article/20181104211917 因为我的博客项目一开始是存放在码云上面的,但是我又想在GitHub上有该项目的提交记录, ...
- flask入门(三)
表单 request.form 能获取POST 请求中提交的表单数据.但是这样不太安全,容易受到恶意攻击.对此,flask有一个flask-wtf扩展,用于避免这一情况 在虚拟环境下用pip inst ...
- 逗号运算符与括号 - C语言
例1 int x; int a=(x=2),12;// 赋值优先级高于逗号,相当于a=x=2,12是多余的 printf("a=%d",a); 结果:a=2 例2 int x; i ...
- 【Unity|C#】基础篇(7)——属性(Property)/ 索引器(Indexer)
[学习资料] <C#图解教程>(第6章):https://www.cnblogs.com/moonache/p/7687551.html 电子书下载:https://pan.baidu.c ...
- cc.formatStr()用法
cc.formatStr() 第一个变量为含有 %s 或 %d 的字符串 后面依次为%s或%d对应的内容
- 多源最短路(floyd算法)
Floyd算法: 如何简单方便的求出图中任意两点的最短路径 Floyd-Warshall算法(O(n)比较适用于边较多的稠密图(Dense Graph)) Floyd算法用来找出每对顶点之间的最短距离 ...
- Java中数字的格式化输出
Java中数字的格式化输出 double d = 345.678; String s = "hello!"; int i = 1234; //"%"表示进行格式 ...
- jQuery jqgrid
1.写div <div class="ibox-content"> <div class="jqGrid_wrapper"> <! ...
- Ninject 2.x细说---1.基本使用
Ninject 2.x细说---1.基本使用 https://blog.csdn.net/weixin_33809981/article/details/86091159 本来想使用一下Ninje ...
- js中float失精
https://juejin.im/post/5aa1395c6fb9a028df223516 把小数转为整数,然后计算 https://www.html.cn/archives/7340