diff options
| author | omagdy7 <omar.professional8777@gmail.com> | 2022-11-05 01:28:02 +0200 |
|---|---|---|
| committer | omagdy7 <omar.professional8777@gmail.com> | 2022-11-05 01:28:02 +0200 |
| commit | c52b36c6a37fdb1d1de146d3939cb42e2c691f44 (patch) | |
| tree | b13bbc546bf9505c875dde5d26424d39d23054c9 /codeforces/QueueAtTheSchool | |
| parent | b79a55ceee2f4532ef6621f9d86c6c61543ce6c9 (diff) | |
| download | competitive-programming-c52b36c6a37fdb1d1de146d3939cb42e2c691f44.tar.xz competitive-programming-c52b36c6a37fdb1d1de146d3939cb42e2c691f44.zip | |
Solved 6 problem in filtrationContest and restructured the repo
Diffstat (limited to 'codeforces/QueueAtTheSchool')
| -rw-r--r-- | codeforces/QueueAtTheSchool/inp | 0 | ||||
| -rwxr-xr-x | codeforces/QueueAtTheSchool/main | bin | 0 -> 626256 bytes | |||
| -rw-r--r-- | codeforces/QueueAtTheSchool/main.cpp | 17 | ||||
| -rw-r--r-- | codeforces/QueueAtTheSchool/main_input0.txt | 2 | ||||
| -rw-r--r-- | codeforces/QueueAtTheSchool/main_input1.txt | 2 | ||||
| -rw-r--r-- | codeforces/QueueAtTheSchool/main_input2.txt | 2 | ||||
| -rw-r--r-- | codeforces/QueueAtTheSchool/main_output0.txt | 1 | ||||
| -rw-r--r-- | codeforces/QueueAtTheSchool/main_output1.txt | 1 | ||||
| -rw-r--r-- | codeforces/QueueAtTheSchool/main_output2.txt | 1 |
9 files changed, 26 insertions, 0 deletions
diff --git a/codeforces/QueueAtTheSchool/inp b/codeforces/QueueAtTheSchool/inp new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/codeforces/QueueAtTheSchool/inp diff --git a/codeforces/QueueAtTheSchool/main b/codeforces/QueueAtTheSchool/main Binary files differnew file mode 100755 index 0000000..202a772 --- /dev/null +++ b/codeforces/QueueAtTheSchool/main diff --git a/codeforces/QueueAtTheSchool/main.cpp b/codeforces/QueueAtTheSchool/main.cpp new file mode 100644 index 0000000..2503f26 --- /dev/null +++ b/codeforces/QueueAtTheSchool/main.cpp @@ -0,0 +1,17 @@ +#include<bits/stdc++.h> + +using namespace std; + +int main () { + ios_base::sync_with_stdio(false); + cin.tie(NULL); + int n, t; + cin >> n >> t; + string s; + cin >> s; + string res; + for(int j = 0; j < t; j++) { + s = regex_replace(s, regex("BG"), "GB"); + } + cout << s << endl; +} diff --git a/codeforces/QueueAtTheSchool/main_input0.txt b/codeforces/QueueAtTheSchool/main_input0.txt new file mode 100644 index 0000000..7e48364 --- /dev/null +++ b/codeforces/QueueAtTheSchool/main_input0.txt @@ -0,0 +1,2 @@ +5 1 +BGGBG diff --git a/codeforces/QueueAtTheSchool/main_input1.txt b/codeforces/QueueAtTheSchool/main_input1.txt new file mode 100644 index 0000000..c00f5b3 --- /dev/null +++ b/codeforces/QueueAtTheSchool/main_input1.txt @@ -0,0 +1,2 @@ +5 2 +BGGBG diff --git a/codeforces/QueueAtTheSchool/main_input2.txt b/codeforces/QueueAtTheSchool/main_input2.txt new file mode 100644 index 0000000..0bf01c5 --- /dev/null +++ b/codeforces/QueueAtTheSchool/main_input2.txt @@ -0,0 +1,2 @@ +4 1 +GGGB diff --git a/codeforces/QueueAtTheSchool/main_output0.txt b/codeforces/QueueAtTheSchool/main_output0.txt new file mode 100644 index 0000000..be65f6d --- /dev/null +++ b/codeforces/QueueAtTheSchool/main_output0.txt @@ -0,0 +1 @@ +GBGGB diff --git a/codeforces/QueueAtTheSchool/main_output1.txt b/codeforces/QueueAtTheSchool/main_output1.txt new file mode 100644 index 0000000..5545e22 --- /dev/null +++ b/codeforces/QueueAtTheSchool/main_output1.txt @@ -0,0 +1 @@ +GGBGB diff --git a/codeforces/QueueAtTheSchool/main_output2.txt b/codeforces/QueueAtTheSchool/main_output2.txt new file mode 100644 index 0000000..bb2a41d --- /dev/null +++ b/codeforces/QueueAtTheSchool/main_output2.txt @@ -0,0 +1 @@ +GGGB |
