Submission #523492


Source Code Expand

Copy
#ifndef MYDEBUG
#include <bits/stdc++.h>
#define err(...)
#define errs(...)
#endif

using namespace std;
void Calc();
#define ALL(a) begin(a),end(a)
#define RALL(a) rbegin(a),rend(a)
typedef long long ll;
typedef unsigned long long ull;

signed main() {
  cin.tie(0);
  ios::sync_with_stdio(false);
  cout << fixed << setprecision(15);
  cin.exceptions(istream::failbit | istream::badbit);
  Calc();
  cout.flush();
  return 0;
}

struct Scanner {
  template<class A = string>static A Next() { A a; cin >> a; return a; }
  static string Line() { string s; getline(cin, s); return s; }
  template<class A = int> static vector<A> Array(int n) {
    vector<A> a(n); for (A& i : a) i = Next<A>(); return a;
  }
  static int Int() { return Next<int>(); }
  template<class A> Scanner& operator>>(A &a) { a = Next<A>(); return *this; }
  template<class A> operator A() { return Next<A>(); }
  operator bool() { return !!cin; }
};

/*---------------------------------------------------------------------*/
namespace out {
  template<class A> void Out(A b, A e, const char *between = " ") {
    if (b != e)while (cout << *b, ++b != e) cout << between;
  }
  template<class T>void Outs(const T &t) { cout << t; }
  template<class T, class... Args>void Outs(const T& t, const Args&... args) {
    cout << t << ' ';
    Outs(args...);
  }
}
void Calc() {
  Scanner cin;
  vector<char> a;
  try {
    for (;;) {
      string s;
      cin >> s;
      if (s == "Left") {
        a.push_back('<');
      } else if (s == "Right") {
        a.push_back('>');
      } else {
        a.push_back('A');
      }
      
    }
  } catch (const std::exception&) {

  }
  out::Out(ALL(a)); cout << endl;
}

Submission Info

Submission Time
Task A - スペース高橋君
User oigami
Language C++11 (GCC 4.9.2)
Score 100
Code Size 1747 Byte
Status
Exec Time 27 ms
Memory 928 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 800 KB
corner_1.txt 27 ms 928 KB
corner_2.txt 24 ms 800 KB
example_0.txt 25 ms 800 KB
example_1.txt 24 ms 928 KB
example_2.txt 24 ms 800 KB
maxrand_0.txt 24 ms 928 KB
maxrand_1.txt 24 ms 796 KB
maxrand_2.txt 26 ms 928 KB
random_0.txt 26 ms 920 KB
random_1.txt 24 ms 924 KB
random_2.txt 26 ms 928 KB
random_3.txt 26 ms 924 KB
random_4.txt 26 ms 916 KB