結果
| 問題 | No.18 うーさー暗号 |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2026-10-16 14:20:32 |
| 言語 | C++23(gcc16) (gcc 16.2.0 + boost 1.92.0 + ACL) |
| 結果 |
AC
不安定
|
| 実行時間 | 1 ms / 5,000 ms |
| + 832µs | |
| コード長 | 403 bytes |
| 記録 | |
| コンパイル時間 | 2,796 ms |
| コンパイル使用メモリ | 169,012 KB |
| 実行使用メモリ | 9,712 KB |
| 最終ジャッジ日時 | 2026-10-16 14:20:55 |
| 合計ジャッジ時間 | 3,269 ms |
|
ジャッジサーバーID (参考情報) |
judge3_0 / judge4_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 13 |
ソースコード
#include <iostream>
#include <vector>
int main() {
using namespace std;
constexpr int N = 26;
auto decode = [&](char c, int k) -> char {
int ord = c - 'A';
ord = (ord - k) % N;
ord = (ord + N) % N;
return 'A' + ord;
};
string s;
cin >> s;
int n = s.size();
for (int k = 0; k < n; k++) { cout << decode(s[k], k + 1); }
cout << endl;
}