Submission #3962685


Source Code Expand

#include <bits/stdc++.h>
#define rep(i, m, n) for(int i = m; i < (n); i++)
#define rrep(i,m,n) for(int i = m; i >= n; i--)
#define print(x) cout << (x) << endl;
#define print2(x,y) cout << (x) << " " << (y) << endl;
#define printa(x,n) for(int i = 0; i < n; i++){ cout << (x[i]) << " ";} cout << endl;
#define printa2(x,m,n) for(int i = 0; i < m; i++){ for(int j = 0; j < n; j++){ cout << x[i][j] << " ";} cout << endl;}
#define printp(x,n) for(int i = 0; i < n; i++){ cout << "(" << x[i].first << ", " << x[i].second << ") "; } cout << endl;
#define INF (1e18)
using namespace std;
typedef long long ll;
const ll MOD = 1e9 + 7;
typedef struct{
    ll to;
    ll cost;
} edge;
typedef pair<ll, ll> lpair;
vector<string> split(string str, char del) { //文字列分割
    ll first = 0;
    ll last = str.find_first_of(del);
    vector<string> result;
    if(last == string::npos){
        result.push_back(str);
        return result;
    }
    while (first < str.size()) {
        string subStr(str, first, last - first);

        result.push_back(subStr);

        first = last + 1;
        last = str.find_first_of(del, first);

        if (last == string::npos) {
            last = str.size();
        }
    }
    return result;
}

int main(){
    cin.tie(0);
    ios::sync_with_stdio(false);
    string S;
    getline(cin, S);
    vector<string> ss = split(S, ' ');
    rep(i,0,ss.size()){
        if(ss[i] == "Right"){
            cout << '>';
        }else if(ss[i] == "Left"){
            cout << '<';
        }else{
            cout << 'A';
        }
        if(i != ss.size()-1) cout << ' ';

    }
    cout << endl;

}

Submission Info

Submission Time
Task A - スペース高橋君
User yuji9511
Language C++14 (GCC 5.4.1)
Score 100
Code Size 1691 Byte
Status AC
Exec Time 1 ms
Memory 256 KB

Judge Result

Set Name Sample All
Score / Max Score 0 / 0 100 / 100
Status
AC × 3
AC × 14
Set Name Test Cases
Sample example_0.txt, example_1.txt, example_2.txt
All 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 AC 1 ms 256 KB
corner_1.txt AC 1 ms 256 KB
corner_2.txt AC 1 ms 256 KB
example_0.txt AC 1 ms 256 KB
example_1.txt AC 1 ms 256 KB
example_2.txt AC 1 ms 256 KB
maxrand_0.txt AC 1 ms 256 KB
maxrand_1.txt AC 1 ms 256 KB
maxrand_2.txt AC 1 ms 256 KB
random_0.txt AC 1 ms 256 KB
random_1.txt AC 1 ms 256 KB
random_2.txt AC 1 ms 256 KB
random_3.txt AC 1 ms 256 KB
random_4.txt AC 1 ms 256 KB