【CS Round #46 (Div. 1.5) A】Letters Deque
【链接】h在这里写链接
【题意】
【题解】
【错的次数】
【反思】
【代码】
/* */
#include <cstdio>
#include <iostream>
#include <algorithm>
#include <cstring>
#include <vector>
#include <map>
#include <queue>
#include <iomanip>
#include <set>
#include <cstdlib>
#include <cmath>
#include <bitset>
using namespace std;
#define lson l,m,rt<<1
#define rson m+1,r,rt<<1|1
#define LL long long
#define rep1(i,a,b) for (int i = a;i <= b;i++)
#define rep2(i,a,b) for (int i = a;i >= b;i--)
#define mp make_pair
#define pb emplace_back
#define fi first
#define se second
#define ld long double
#define ms(x,y) memset(x,y,sizeof x)
#define ri(x) scanf("%d",&x)
#define rl(x) scanf("%lld",&x)
#define rs(x) scanf("%s",x)
#define rf(x) scnaf("%lf",&x)
#define oi(x) printf("%d",x)
#define ol(x) printf("%lld",x)
#define oc putchar(' ')
#define os(x) printf(x)
#define all(x) x.begin(),x.end()
#define Open() freopen("F:\\rush.txt","r",stdin)
#define Close() ios::sync_with_stdio(0)
#define sz(x) ((int) x.size())
#define ld long double typedef pair<int,int> pii;
typedef pair<LL,LL> pll; //mt19937 myrand(time(0));
//int get_rand(int n){return myrand()%n + 1;}
const int dx[9] = {0,1,-1,0,0,-1,-1,1,1};
const int dy[9] = {0,0,0,-1,1,-1,1,-1,1};
const double pi = acos(-1.0);
const int N = 110; int Q;
string s;
char sa[3]; int main(){
//Open();
//Close();
ri(Q);
while (Q--){
int a;
ri(a),rs(sa);
if (a==0){
s = sa[0] + s;
}else
s = s + sa[0];
}
cout << s << endl;
return 0;
}
【CS Round #46 (Div. 1.5) A】Letters Deque的更多相关文章
- 【CS Round #46 (Div. 1.5) B】Letters Deque
[链接]h在这里写链接 [题意] 让你把一个正方形A竖直或水平翻转. 问你翻转一次能不能把A翻转成B [题解] 有说一定要恰好为1次. 并不是说A和B相同就一定不行. [错的次数] 2 [反思] 自己 ...
- 【CS Round #46 (Div. 1.5) E】Ultimate Orbs
[链接]链接 [题意] n个人从左到右站在一条直线上.每个人都有一个能力值g[i],然后每个人可以将相邻的一个人打败. 然后它的能力值能够增加相应的能力值(就是打败了的那个人的能力值). A能够打败B ...
- 【CS Round #46 (Div. 1.5) C】Set Subtraction
[链接]h在这里写链接 [题意] 一开始有n个数字,然后有一个数字X,把每个数字都减去X,又生成N个新的数字. 然后把这2*N个数字混在一起. 告诉你这2*N个数字是什么.让你复原出原来的N个数字,以 ...
- 【CS Round #36 (Div. 2 only) A】Bicycle Rental
[题目链接]:https://csacademy.com/contest/round-36/task/bicycle-rental/ [题意] 让你从n辆车中选一辆车; 每一辆车有3个属性 1.到达车 ...
- 【CS Round #37 (Div. 2 only) D】Reconstruct Graph
[Link]:https://csacademy.com/contest/round-37/task/reconstruct-graph/statement/ [Description] 给你一张图; ...
- 【CS Round #37 (Div. 2 only) B】Group Split
[Link]:https://csacademy.com/contest/round-37/task/group-split/ [Description] 让你把一个数分成两个数a.b的和; (a,b ...
- 【CS Round #37 (Div. 2 only) A】Boring Number
[Link]:https://csacademy.com/contest/round-37/task/boring-number/ [Description] 让你找离平均数最近的一个数的下标; [S ...
- 【CS Round #39 (Div. 2 only) D】Seven-segment Display
[Link]:https://csacademy.com/contest/round-39/task/seven-segment-display/ [Description] 0..9各自有一个数字, ...
- 【CS Round #39 (Div. 2 only) C】Reconstruct Sum
[Link]:https://csacademy.com/contest/round-39/task/reconstruct-sum/ [Description] 给你一个数字S; 让你找有多少对A, ...
随机推荐
- tr---对来自标准输入的字符进行替换、压缩和删除。
tr命令可以对来自标准输入的字符进行替换.压缩和删除.它可以将一组字符变成另一组字符,经常用来编写优美的单行命令,作用很强大. 语法 tr(选项)(参数) 选项 -c或——complerment:取代 ...
- 学习——HTML5
HTML5多用于手机页面制作,因为PC版浏览器大多不兼容,可以通过下面网站查看HTML5浏览器兼容情况: http://www.caniuse.com/#index 一.语义化标签 1.<hea ...
- Justinmind使用教程(5)——Justinmind破解
今天继续用Justinmind的时候.提示快到期啦. 所以今天学习的课题比較简单了,就是怎样破解Justinmind. 眼下没有无敌的注冊码,大家依照例如以下方式操作一定就解决全部问题了 1.删除两个 ...
- 70.nodejs操作mongodb
转自:https://www.cnblogs.com/whoamme/p/3467374.html 首先安装nodejs mongodb npm install mongodb var mongodb ...
- $.each(data, function (index, value) { })的用法;json和list<>的互相转换
在json中常常碰到这样的代码: jquery $.each(data, function (index, value) { }) 遍历处理data,可以是数组.DOM.json等,取决于直接给 ...
- C#使用一般处理程序(ashx)中session
.ashx中引用 session必须 using System.Web.SessionState ,继承IReadOnlySessionState/IRequiresSessionState IRea ...
- 【习题 8-12 UVA - 1153】Keep the Customer Satisfied
[链接] 我是链接,点我呀:) [题意] 在这里输入题意 [题解] 结束时间比较早的,就早点开始做. 所以,将n件事情,按照结束时间升序排. 然后对于第i件事情. 尽量把它往左排. 即t+1..t+a ...
- Summary Day32
1 . 文件管理 1.1 标C文件处理和UC文件处理函数的比較: 标C文件处理函数比UC的文件处理函数速度快.由于标C内部独立输入输出缓冲区, 会积累一定数量之后再写入文件,因此读写效率比較高 使用t ...
- [React] Use the URL as the source of truth in React
In Single Page Apps we're used to fetch the data on event callbacks. That disables the capacity to u ...
- UnrealEngine4针对游戏模式的思考
游戏能够概括为三类:单进程联机(超级玛丽).小规模联机(魔兽争霸.CS),大规模联机(魔兽世界). watermark/2/text/aHR0cDovL2Jsb2cuY3Nkbi5uZXQvZmx1c ...