| # | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 | 
|---|---|---|---|---|---|---|---|
| 224479 | baoduytran0104 | Programiranje (COCI17_programiranje) | C++14 | 3098 ms | 1192 KiB | 
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include <bits/stdc++.h>
using namespace std;
int q, a, b, c, d, k, m[100], n, t;
string s, x, y;
int main()
{
    cin >> s;
    k = s.length();
    s = ' ' + s;
    cin >> q;
    while(q--) {
        t = 0;
        cin >> a >> b >> c >> d;
        if (b -a != d - c) {
            cout << "NE" << '\n';
            continue;
        }
        x = s.substr(a, b - a + 1);
        y = s.substr(c, d - c + 1);
        sort(x.begin(), x.end());
        sort(y.begin(), y.end());
        if(x == y) cout << "DA\n";
        else cout << "NE\n";
    }
}
| # | Verdict | Execution time | Memory | Grader output | 
|---|---|---|---|---|
| Fetching results... | ||||
