Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <cstdlib>
- #include <vector>
- using namespace std;
- int main()
- {
- int n;
- cin >> n;
- while(n--) { // izmini n broevi
- string a, b;
- cin >> a >> b;
- int i = 0, j = 0;
- while(i < a.size() && j < b.size()) {
- if(a[i] == b[j]) {
- i++;
- j++;
- }
- else {
- j++;
- }
- }
- if(i == a.size()) {
- cout << "DA" << endl;
- }
- else {
- cout << "NE" << endl;
- }
- }
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement