# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
659993 | ajthelegendcoder | Programiranje (COCI17_programiranje) | C++17 | 3083 ms | 856 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;
int main(){
string s;
cin >> s;
int q;
cin >> q;
while(q--){
int a,b,c,d;
cin >> a >> b >> c >> d;
a -= 1;
b -= 1;
c -= 1;
d -= 1;
string x = s.substr(a,b-a+1);
string y = s.substr(c,d-c+1);
sort(x.begin(), x.end());
sort(y.begin(), y.end());
if(x == y) cout << "DA" << endl;
else cout << "NE" << endl;
}
}
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |