Submission #524183


Source Code Expand

Copy
#include "iostream"
#include "fstream"
#include "string"

using namespace std;

ifstream fin("input.txt");

int main(){

	int c = 0;

	while (1){

		string w;
		int loc;

		//fin >> w;
		cin >> w;

		if (w.empty() != true){ 
			if (c != 0){
				cout << " ";
			}
			c++;
		}
		else{
			cout << endl;
			break;
		}

		//cout << w << endl;
		
		loc = w.find("Left", 0);
		if (loc != string::npos)w.replace(loc, 4, "<");

		loc = w.find("Right", 0);
		if (loc != string::npos)w.replace(loc, 5, ">");

		loc = w.find("AtCoder", 0);
		if (loc != string::npos)w.replace(loc, 7, "A");

		cout << w;

	}

	return 0;
}

Submission Info

Submission Time
Task A - スペース高橋君
User Rakaz
Language C++ (GCC 4.9.2)
Score 100
Code Size 658 Byte
Status
Exec Time 27 ms
Memory 924 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 27 ms 860 KB
corner_1.txt 26 ms 924 KB
corner_2.txt 26 ms 924 KB
example_0.txt 26 ms 924 KB
example_1.txt 27 ms 744 KB
example_2.txt 27 ms 868 KB
maxrand_0.txt 26 ms 924 KB
maxrand_1.txt 26 ms 924 KB
maxrand_2.txt 25 ms 924 KB
random_0.txt 27 ms 872 KB
random_1.txt 27 ms 800 KB
random_2.txt 26 ms 864 KB
random_3.txt 26 ms 800 KB
random_4.txt 27 ms 864 KB