提出 #28723061
ソースコード 拡げる
#include <bits/stdc++.h>
#define err(args...) {}
#ifdef DEBUG
#include "_debug.cpp"
#endif
using namespace std;
using ll = long long;
using ld = long double;
template <typename T> using lim = numeric_limits<T>;
template <typename T> istream& operator>>(istream& is, vector<T>& a) { for(T& x : a) { is >> x; } return is; }
template <typename X, typename Y> istream& operator>>(istream& is, pair<X, Y>& p) { return is >> p.first >> p.second; }
int main() {
ios_base::sync_with_stdio(false);
cin.tie(0);
string s;
int a, b;
cin >> s >> a >> b;
a--, b--;
swap(s[a], s[b]);
cout << s << endl;
return 0;
}
提出情報
| 提出日時 | |
|---|---|
| 問題 | A - chukodai |
| ユーザ | verngutz |
| 言語 | C++ (GCC 9.2.1) |
| 得点 | 100 |
| コード長 | 658 Byte |
| 結果 | AC |
| 実行時間 | 6 ms |
| メモリ | 3660 KiB |
ジャッジ結果
| セット名 | Sample | All | ||||
|---|---|---|---|---|---|---|
| 得点 / 配点 | 0 / 0 | 100 / 100 | ||||
| 結果 |
|
|
| セット名 | テストケース |
|---|---|
| Sample | example0.txt, example1.txt, example2.txt |
| All | 000.txt, 001.txt, 002.txt, 003.txt, 004.txt, 005.txt, 006.txt, 007.txt, 008.txt, 009.txt, 010.txt, 011.txt, 012.txt, 013.txt, example0.txt, example1.txt, example2.txt |
| ケース名 | 結果 | 実行時間 | メモリ |
|---|---|---|---|
| 000.txt | AC | 6 ms | 3516 KiB |
| 001.txt | AC | 3 ms | 3656 KiB |
| 002.txt | AC | 2 ms | 3584 KiB |
| 003.txt | AC | 2 ms | 3512 KiB |
| 004.txt | AC | 2 ms | 3616 KiB |
| 005.txt | AC | 2 ms | 3648 KiB |
| 006.txt | AC | 2 ms | 3576 KiB |
| 007.txt | AC | 1 ms | 3580 KiB |
| 008.txt | AC | 4 ms | 3660 KiB |
| 009.txt | AC | 3 ms | 3608 KiB |
| 010.txt | AC | 2 ms | 3620 KiB |
| 011.txt | AC | 2 ms | 3616 KiB |
| 012.txt | AC | 2 ms | 3648 KiB |
| 013.txt | AC | 2 ms | 3620 KiB |
| example0.txt | AC | 3 ms | 3568 KiB |
| example1.txt | AC | 2 ms | 3572 KiB |
| example2.txt | AC | 2 ms | 3616 KiB |