# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
85152 | MatesV13 | Programiranje (COCI17_programiranje) | C++11 | 3054 ms | 6516 KiB |
This submission is migrated from previous version of oj.uz, which used different machine for grading. This submission may have different result if resubmitted.
#include <bits/stdc++.h>
using namespace std;
long long a, b, c, d, x;
string word;
multiset<char> sab;
multiset<char> scd;
int main (){
ios::sync_with_stdio(0);
cin.tie(0);
cin >> word;
cin >> x;
for (int i=0;i<x;i++){
cin >> a >> b >> c >> d;
for (int j=a;j<b+1;j++) sab.insert(word[j-1]);
for (int j=c;j<d+1;j++) scd.insert(word[j-1]);
if (sab == scd) cout << "DA\n";
else cout << "NE\n";
sab.clear();
scd.clear();
}
return 0;
}
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |