Submission #523424


Source Code Expand

Copy
//include
//------------------------------------------
#include <bits/stdc++.h>

using namespace std;

//conversion
//------------------------------------------
inline int toInt(string s) {int v; istringstream sin(s);sin>>v;return v;}
inline long long toLL(string s) {long long v; istringstream sin(s);sin>>v;return v;}
template<class T> inline string toString(T x) {ostringstream sout;sout<<x;return sout.str();}

//math
//-------------------------------------------
template<class T> inline T sqr(T x) {return x*x;}

//typedef
//------------------------------------------
typedef vector<int> VI;
typedef vector<VI> VVI;
typedef vector<string> VS;
typedef pair<int, int> PII;
typedef pair<long, long> PLL;
typedef long long LL;
//container util
//------------------------------------------
#define ALL(a)  (a).begin(),(a).end()
#define RALL(a) (a).rbegin(), (a).rend()
#define PB push_back
#define MP make_pair
#define SZ(a) int((a).size())
#define EXIST(s,e) ((s).find(e)!=(s).end())
#define SORT(c) sort((c).begin(),(c).end())

//repetition
//------------------------------------------
#define FOR(i,a,b) for(long i=(a);i<(b);++i)
#define REP(i,n)  FOR(i,0,n)

//constant
//--------------------------------------------
#define CLR(a) memset((a), 0 ,sizeof(a))



int main(){
	string S;
	getline(cin,S);
	int pos=0;
	vector<string>res;
	while(pos<SZ(S)){
		if(S[pos]=='L'){
			res.PB("<");
			pos+=5;
		}else if(S[pos]=='R'){
			res.PB(">");
			pos+=6;
		}else{
			res.PB("A");
			pos+=8;
		}
	}
	REP(i,SZ(res)){
		cout<<res[i];
		if(i!=SZ(res)-1)cout<<" ";
	}
	cout<<endl;
	return 0;
}

Submission Info

Submission Time
Task A - スペース高橋君
User blue0620
Language C++ (GCC 4.9.2)
Score 100
Code Size 1658 Byte
Status
Exec Time 32 ms
Memory 932 KB

Test Cases

Set Name Score / Max Score Test Cases
Sample 0 / 0 example_0.txt, example_1.txt, example_2.txt
All 100 / 100 corner_0.txt, corner_1.txt, corner_2.txt, example_0.txt, example_1.txt, example_2.txt, maxrand_0.txt, maxrand_1.txt, maxrand_2.txt, random_0.txt, random_1.txt, random_2.txt, random_3.txt, random_4.txt
Case Name Status Exec Time Memory
corner_0.txt 26 ms 812 KB
corner_1.txt 25 ms 796 KB
corner_2.txt 25 ms 932 KB
example_0.txt 25 ms 928 KB
example_1.txt 25 ms 800 KB
example_2.txt 25 ms 800 KB
maxrand_0.txt 24 ms 924 KB
maxrand_1.txt 32 ms 764 KB
maxrand_2.txt 25 ms 924 KB
random_0.txt 24 ms 800 KB
random_1.txt 24 ms 920 KB
random_2.txt 25 ms 676 KB
random_3.txt 25 ms 872 KB
random_4.txt 25 ms 924 KB