# | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
625935 | elesis | Programiranje (COCI17_programiranje) | C++14 | 3074 ms | 1064 KiB |
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include<bits/stdc++.h>
using namespace std;
#define fast ios_base::sync_with_stdio(false);cin.tie(0);
#define int long long
#define pii pair<int,int>
#define ff first
#define ss second
const int inf=1e11+7;
const int N=107;
const int mod =1000000007;
vector <int> adj[N];
void solve()
{
string s;
cin>>s;
int q;
cin>>q;
while(q--)
{
int a,b,c,d;
cin>>a>>b>>c>>d;
string x="",y="";
for(int i=a-1;i<b;i++)
{
x.push_back(s[i]);
}
for(int i=c-1;i<d;i++)
{
y.push_back(s[i]);
}
sort(x.begin(),x.end());
sort(y.begin(),y.end());
if(x==y)
{
cout << "DA" << "\n";
}
else
{
cout << "NE" << '\n';
}
}
}
signed main()
{
fast
clock_t start, end;
start = clock();
solve();
end = clock();
double time_taken=double(end-start)/double(CLOCKS_PER_SEC);
//cout << "time taken" << " " << time_taken << "\n";
}
컴파일 시 표준 에러 (stderr) 메시지
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |