# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
1086494 | toast12 | Programiranje (COCI17_programiranje) | C++14 | 3074 ms | 1080 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() {
ios_base::sync_with_stdio(0);
cin.tie(NULL);
string s;
cin >> s;
int q;
cin >> q;
while (q--) {
int a, b, c, d;
cin >> a >> b >> c >> d;
string x = s.substr(a-1, b-a+1);
string y = s.substr(c-1, d-c+1);
sort(x.begin(), x.end());
sort(y.begin(), y.end());
if (x == y) cout << "DA\n";
else cout << "NE\n";
}
return 0;
}
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |