結果
問題 |
No.729 文字swap
|
ユーザー |
![]() |
提出日時 | 2018-09-09 12:52:24 |
言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
結果 |
AC
|
実行時間 | 2 ms / 2,000 ms |
コード長 | 292 bytes |
コンパイル時間 | 1,605 ms |
コンパイル使用メモリ | 158,300 KB |
実行使用メモリ | 5,248 KB |
最終ジャッジ日時 | 2024-12-23 05:25:48 |
合計ジャッジ時間 | 1,987 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 11 |
ソースコード
#include <bits/stdc++.h> typedef unsigned long long ll; #define INF 1000000000 using namespace std; void solve(string s,int a,int b){ char tmp; tmp=s[a]; s[a]=s[b]; s[b]=tmp; cout<<s<<endl; } int main(void){ string s; int a,b; cin>>s>>a>>b; solve(s,a,b); }