diff options
Diffstat (limited to 'codechef/HiringTest')
| -rw-r--r-- | codechef/HiringTest/inp | 0 | ||||
| -rwxr-xr-x | codechef/HiringTest/main | bin | 0 -> 31976 bytes | |||
| -rw-r--r-- | codechef/HiringTest/main.cpp | 27 | ||||
| -rw-r--r-- | codechef/HiringTest/main_input0.txt | 15 | ||||
| -rw-r--r-- | codechef/HiringTest/main_output0.txt | 3 |
5 files changed, 45 insertions, 0 deletions
diff --git a/codechef/HiringTest/inp b/codechef/HiringTest/inp new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/codechef/HiringTest/inp diff --git a/codechef/HiringTest/main b/codechef/HiringTest/main Binary files differnew file mode 100755 index 0000000..7bf6644 --- /dev/null +++ b/codechef/HiringTest/main diff --git a/codechef/HiringTest/main.cpp b/codechef/HiringTest/main.cpp new file mode 100644 index 0000000..e5a08a8 --- /dev/null +++ b/codechef/HiringTest/main.cpp @@ -0,0 +1,27 @@ +#include<bits/stdc++.h> + +using namespace std; + +int main () { + ios_base::sync_with_stdio(false); + cin.tie(NULL); + int tt; + cin >> tt; + while(tt--){ + int n, m, x, y; + cin >> n >> m >> x >> y; + string ans = ""; + for(int i = 0; i < n; i++) { + string pb; + cin >> pb; + int f = count(pb.begin(), pb.end(), 'F'); + int p = count(pb.begin(), pb.end(), 'P'); + if(f >= x || f == x - 1 && p >= y) { + ans.push_back('1'); + } else { + ans.push_back('0'); + } + } + cout << ans << endl; + } +} diff --git a/codechef/HiringTest/main_input0.txt b/codechef/HiringTest/main_input0.txt new file mode 100644 index 0000000..46cc6c4 --- /dev/null +++ b/codechef/HiringTest/main_input0.txt @@ -0,0 +1,15 @@ +3 +4 5 +3 2 +FUFFP +PFPFU +UPFFU +PPPFP +3 4 +1 3 +PUPP +UUUU +UFUU +1 3 +2 2 +PPP diff --git a/codechef/HiringTest/main_output0.txt b/codechef/HiringTest/main_output0.txt new file mode 100644 index 0000000..171c34b --- /dev/null +++ b/codechef/HiringTest/main_output0.txt @@ -0,0 +1,3 @@ +1100 +101 +0 |
