自己写的不怎么行1052. 卖个萌 (20)
来源:互联网 发布:什么叫矩阵测光 编辑:程序博客网 时间:2024/06/04 18:43
/*
[╮][╭][o][~\][/~][<][>]
[╯][╰][^][-][=][>][<][@][⊙]
[Д][▽][_][ε][^]
4
1 1 2 2 2
6 8 1 5 5
3 3 4 3 3
2 10 3 9 3
*/
#include<iostream>
#include<string>
#include<vector>
using namespace std;
int main()
{
string q;
vector<string>a;
vector< vector<string> >b; ///////
int len;
int flag=3;
for(int i=0;i<3;i++)
{
vector<string>c; //每次创建一个 一维 string类的数组c 但赋值不是等于而是c.push_back('东西')/ push_back( s.substr(开始位置下标 i,k-i-1长度 ) )
string temp;
cin>>temp;
len=temp.length();
for(int j=0;j<len;j++)
{
if(temp[j]=='[')
{
for(int k=j+1;k<len;k++)
{
if(temp[k]==']')
{
c.push_back( temp.substr(j+1,k-j-1) );
break;
}
}
}
}
b.push_back(c); //把一维的 赋值给二维
}
/*
4
1 1 2 2 2
6 8 1 5 5
3 3 4 3 3
2 10 3 9 3
*/
int x;
cin>>x;
for(int i=0;i<x;i++)
{
int y,u,ii,o,p;
cin>>y>>u>>ii>>o>>p;
if( y>b[0].size()|| u>b[1].size()|| ii>b[2].size()|| o>b[1].size()|| p>b[0].size() ) ///vector 创建的数组有 b.size()这个函数来获取数组长度
{
cout<<"wawawawawa"<<endl;
}
else{
cout<<b[0][y]<<"("<<b[1][u]<<b[2][ii]<<b[1][o]<<")"<<b[0][p]<<endl;
}
}
return 0;
}
[╮][╭][o][~\][/~][<][>]
[╯][╰][^][-][=][>][<][@][⊙]
[Д][▽][_][ε][^]
4
1 1 2 2 2
6 8 1 5 5
3 3 4 3 3
2 10 3 9 3
*/
#include<iostream>
#include<string>
#include<vector>
using namespace std;
int main()
{
string q;
vector<string>a;
vector< vector<string> >b; ///////
int len;
int flag=3;
for(int i=0;i<3;i++)
{
vector<string>c; //每次创建一个 一维 string类的数组c 但赋值不是等于而是c.push_back('东西')/ push_back( s.substr(开始位置下标 i,k-i-1长度 ) )
string temp;
cin>>temp;
len=temp.length();
for(int j=0;j<len;j++)
{
if(temp[j]=='[')
{
for(int k=j+1;k<len;k++)
{
if(temp[k]==']')
{
c.push_back( temp.substr(j+1,k-j-1) );
break;
}
}
}
}
b.push_back(c); //把一维的 赋值给二维
}
/*
4
1 1 2 2 2
6 8 1 5 5
3 3 4 3 3
2 10 3 9 3
*/
int x;
cin>>x;
for(int i=0;i<x;i++)
{
int y,u,ii,o,p;
cin>>y>>u>>ii>>o>>p;
if( y>b[0].size()|| u>b[1].size()|| ii>b[2].size()|| o>b[1].size()|| p>b[0].size() ) ///vector 创建的数组有 b.size()这个函数来获取数组长度
{
cout<<"wawawawawa"<<endl;
}
else{
cout<<b[0][y]<<"("<<b[1][u]<<b[2][ii]<<b[1][o]<<")"<<b[0][p]<<endl;
}
}
return 0;
}
阅读全文
0 0
- 自己写的不怎么行1052. 卖个萌 (20)
- CSDN的写文章功能不怎么好用
- 对新手在使用jni不怎么明白的一些指导;我看看来几处这方面的教程写的,相当于用自己的语言转述一下
- 一段midp1纹理的代码,是自己推的肯定不怎么好
- 虽然第一次写不怎么好跟许多大大的比不了
- Angular 2 + 折腾记 :(8) 动手写一个不怎么靠谱的上传组件
- 拆行自己写的
- 天气真的不怎么好
- 一些不怎么注意的细节
- 一道不怎么理解的题
- 自己写的打印沙漏(20).cpp
- 自己写的1048. 数字加密(20)
- 写自己的rss
- 写自己的rss
- 自己写的sqlhelper
- 自己写的strcmp
- 自己写的一首诗
- 写自己的软件
- 常用js相关记录
- java8一些应用
- mysql基本命令
- 三星Bixby中文版
- 类型转换new一个数据类的好处
- 自己写的不怎么行1052. 卖个萌 (20)
- jquery 制作出右键菜单
- 修改Xcode自动生成的文件注释来导出API文档
- Crypto++
- Vue2.0使用props传递数据【data篇】
- 【机器学习】Random Forests随机森林的基础及运用
- 深入理解try catch吃掉异常,及catch(Exception e)中的异常
- RabbitMQ安装详解
- js中set与map