aboutsummaryrefslogtreecommitdiff
path: root/codeforces/QueueAtTheSchool
diff options
context:
space:
mode:
Diffstat (limited to 'codeforces/QueueAtTheSchool')
-rw-r--r--codeforces/QueueAtTheSchool/inp0
-rwxr-xr-xcodeforces/QueueAtTheSchool/mainbin0 -> 626256 bytes
-rw-r--r--codeforces/QueueAtTheSchool/main.cpp17
-rw-r--r--codeforces/QueueAtTheSchool/main_input0.txt2
-rw-r--r--codeforces/QueueAtTheSchool/main_input1.txt2
-rw-r--r--codeforces/QueueAtTheSchool/main_input2.txt2
-rw-r--r--codeforces/QueueAtTheSchool/main_output0.txt1
-rw-r--r--codeforces/QueueAtTheSchool/main_output1.txt1
-rw-r--r--codeforces/QueueAtTheSchool/main_output2.txt1
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
new file mode 100755
index 0000000..202a772
--- /dev/null
+++ b/codeforces/QueueAtTheSchool/main
Binary files differ
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