結果
| 問題 |
No.18 うーさー暗号
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2019-09-08 21:39:17 |
| 言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 592 bytes |
| コンパイル時間 | 1,667 ms |
| コンパイル使用メモリ | 176,052 KB |
| 実行使用メモリ | 6,948 KB |
| 最終ジャッジ日時 | 2024-06-27 15:15:31 |
| 合計ジャッジ時間 | 2,210 ms |
|
ジャッジサーバーID (参考情報) |
judge1 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 1 WA * 12 |
ソースコード
/**
@file 018.cpp
@title No.18 うーさー暗号 - yukicoder
@url https://yukicoder.me/problems/no/18
**/
#include <bits/stdc++.h>
using namespace std;
typedef long long LL;
#define ALL(obj) (obj).begin(), (obj).end()
#define REP(i, N) for (int i = 0; i < (N); ++i)
int main() {
string S;
cin >> S;
map<char, int> m;
vector<char> dict;
int count = 0;
for (char c = 'A'; c <= 'Z'; c++) {
m[c] = count;
count++;
dict.push_back(c);
}
string ans = "";
REP(i, (int)S.size()) {
ans += dict[m[S[i]] - i - 1];
}
cout << ans << endl;
return 0;
}