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 ...
随机推荐
- C# 修改/新建判断
//查询有无重复(新建用) public List<bloodBreedDetailsEntity> CodeList(string code) { var expression = Ex ...
- Selenium3+python自动化009- 截图
一.断言 assert cur_title=='百度一下,你就知道1','title断言失败' 'title断言失败':自定义报错 二.截图 # 调用截屏方法(路径+截图名称)driver.get_s ...
- linux - python2.6.6 升级到python2.7.14
一.升级 Python 2.7.14 版本 1. 准备安装包,系统是最小化安装 # 下载安装依赖的相关包[root@vip ~]# yum install vim gcc make wget -y [ ...
- (转)R语言 SVM支持向量机在 R 语言中的实现和使用
支持向量机是一个相对较新和较先进的机器学习技术,最初提出是为了解决二类分类问题,现在被广泛用于解决多类非线性分类问题和回归问题.继续阅读本文,你将学习到支持向量机如何工作,以及如何利用R语言实现支持向 ...
- selenium爬去数据+存储
1 爬去数据代码 #coding=utf-8 from selenium import webdriver from selenium.webdriver.common.by import By fr ...
- 巨杉内核笔记 | 会话(Session)
SequoiaDB 巨杉数据库是一款金融级分布式关系型数据库,坚持从零开始打造分布式开源数据库引擎.“内核笔记系列”旨在分享交流 SequoiaDB 巨杉数据库引擎的设计思路和代码解析,帮助社区用户深 ...
- Codeforces Round #600 (Div. 2) D。 Harmonious Graph
#include<iostream> using namespace std ; ; int p[N]; int cnt; int find(int x) { if(p[x]!=x) p[ ...
- php设计模式之策略模式实例代码
html <html> <head> <meta charset="UTF-8"> <title>简单计算器</title&g ...
- xstart访问centos7
参考文档:https://blog.csdn.net/wuzhimang/article/details/51523867
- PP: Data-driven classification of residential energy consumption patterns by means of functional connectivity networks
Purpose Implement a good user aggregation and classification. or to assess the interrelation pattern ...