提出 #62286509


ソースコード 拡げる

#ifndef LOCALEGOR
// #pragma GCC optimize("Ofast")
// #pragma GCC target("avx2")
#endif

#include <bits/stdc++.h>

#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>

using namespace std;
using namespace __gnu_pbds;

#define int long long

template <typename T>
using ordered_set =
    tree<T, null_type, less<T>, rb_tree_tag, tree_order_statistics_node_update>;

using ll = long long;
using ld = long double;
using ull = unsigned long long;

#define all(x) (x).begin(), (x).end()
#define rall(x) (x).rbegin(), (x).rend()
#define sz(x) ((int)((x).size()))

const ll MOD = 1e9 + 7;
const ll INF = 1e18 + 7;
const ld PI = acosl(-1);

template <typename T> bool chmax(T &a, T val) {
    if (val > a) {
        a = val;
        return true;
    }
    return false;
}
template <typename T> bool chmin(T &a, T val) {
    if (val < a) {
        a = val;
        return true;
    }
    return false;
}

void yep(bool f = 1) { cout << (f ? "YES\n" : "NO\n"); }
void nope(bool f = 1) { yep(!f); }
void nosol() { cout << -1 << '\n'; }

mt19937_64 rnd(chrono::steady_clock::now().time_since_epoch().count());

void solve() {
    string s;
    cin >> s;
    map<char, char> mp;
    mp['N'] = 'S';
    mp['S'] = 'N';
    mp['W'] = 'E';
    mp['E'] = 'W';
    for (char c : s) cout << mp[c];
}

signed main() {
#ifdef LOCALEGOR
    freopen("INPUT.txt", "r", stdin);
    // freopen("OUTPUT.txt", "w", stdout);
#else
    ios_base::sync_with_stdio(false), cin.tie(0), cout.tie(0);
#endif // LOCALEGOR
    cout << fixed << setprecision(12);
    int tt = 1;
    // cin >> tt;
    while (tt--) {
        solve();
    }
    return 0;
}

提出情報

提出日時
問題 A - Lucky Direction
ユーザ sputn1k
言語 C++ 20 (gcc 12.2)
得点 100
コード長 1717 Byte
結果 AC
実行時間 1 ms
メモリ 3572 KiB

ジャッジ結果

セット名 Sample All
得点 / 配点 0 / 0 100 / 100
結果
AC × 2
AC × 8
セット名 テストケース
Sample 00_sample_01.txt, 00_sample_02.txt
All 00_sample_01.txt, 00_sample_02.txt, 01_test_01.txt, 01_test_02.txt, 01_test_03.txt, 01_test_04.txt, 01_test_05.txt, 01_test_06.txt
ケース名 結果 実行時間 メモリ
00_sample_01.txt AC 1 ms 3504 KiB
00_sample_02.txt AC 1 ms 3496 KiB
01_test_01.txt AC 1 ms 3500 KiB
01_test_02.txt AC 1 ms 3572 KiB
01_test_03.txt AC 1 ms 3504 KiB
01_test_04.txt AC 1 ms 3460 KiB
01_test_05.txt AC 1 ms 3568 KiB
01_test_06.txt AC 1 ms 3496 KiB