제출 #547744

#제출 시각아이디문제언어결과실행 시간메모리
547744DeepessonXOR (IZhO12_xor)C++17
0 / 100
2082 ms1356 KiB
#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 timeMemoryGrader output
Fetching results...