結果
| 問題 |
No.729 文字swap
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2018-09-07 21:56:01 |
| 言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
AC
|
| 実行時間 | 2 ms / 2,000 ms |
| コード長 | 657 bytes |
| コンパイル時間 | 1,779 ms |
| コンパイル使用メモリ | 165,332 KB |
| 実行使用メモリ | 5,248 KB |
| 最終ジャッジ日時 | 2024-11-29 13:03:51 |
| 合計ジャッジ時間 | 2,137 ms |
|
ジャッジサーバーID (参考情報) |
judge4 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 11 |
ソースコード
#include "bits/stdc++.h"
using namespace std;
using ll = long long;
using ull = unsigned long long;
typedef pair< long long, long long > P;
typedef pair< long long, P > PP;
typedef pair< P, P > PPP;
const long long MOD = 1e9 + 7;
const long long INF = 5e18;
const double DINF = 5e14;
const double eps = 1e-10;
const int di[4] = { 1,0,-1,0 }, dj[4] = { 0,1,0,-1 };
#define ALL(x) (x).begin(),(x).end()
#define ALLR(x) (x).rbegin(),(x).rend()
#define pb push_back
#define eb emplace_back
#define fr first
#define sc second
string s;
int n, m;
int main() {
cin >> s >> n >> m;
char c = s[m];
s[m] = s[n], s[n] = c;
cout << s << endl;
return 0;
}