Wrong Answer
Code
#include <bits/stdc++.h>
using namespace std;
int main() {
int n;
cin>>n;
string s;cin>>s;
int count = 0;
for (int i = 0; i < n- 1;i++) {
for (int j = i + 1; j < n;j++) {
string temp = s;
swap(temp[i], temp[j]);
if (temp == s) {
count++;
}
}
}
return 0;
}
Information
- Submit By
- Type
- Submission
- Problem
- P1038 Do not touch my string
- Contest
- Brain Booster #3
- Language
- C++20 (G++ 13.2.0)
- Submit At
- 2024-05-06 15:56:17
- Judged At
- 2024-11-11 03:33:39
- Judged By
- Score
- 0
- Total Time
- 1ms
- Peak Memory
- 328.0 KiB