# | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
547744 | Deepesson | XOR (IZhO12_xor) | C++17 | 2082 ms | 1356 KiB |
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include <bits/stdc++.h>
int main()
{
int N,X;
std::cin>>N>>X;
int array[N];
for(int i=0;i!=N;++i)std::cin>>array[i];
int max=0,split=0;
for(int i=0;i!=N;++i){
int xoro=0;
for(int j=i;j!=N;++j){
xoro^=array[j];
/// std::cout<<xoro<<" ";
if(xoro>=X&&(j-i+1)>max){
max=(j-i+1);
split=i;
}
}
/// std::cout<<"\n";
}
std::cout<<(split+1)<<" "<<max<<"\n";
}
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |