# | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
659993 | ajthelegendcoder | Programiranje (COCI17_programiranje) | C++17 | 3083 ms | 856 KiB |
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#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... |