| # | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
|---|---|---|---|---|---|---|---|
| 1356634 | sally | Gift Boxes (EGOI25_giftboxes) | C++20 | 2094 ms | 13944 KiB |
#include<iostream>
#include<vector>
#include<set>
using namespace std;
const int mx = 5e5+5;
vector<int> team(mx);
bool v1[mx], v2[mx];
int T, N;
int main() {
cin>>T>>N;
for(int i=0; i<N; i++) {
cin>>team[i];
}
set<int> st;
for(int len = 1; len<=N; len++) {
for(int L = 0; L + len - 1 <N; L++) {
int R = L + len - 1;
st.clear();
bool flag = false;
for(int i=0; i<L; i++) {
if(st.count(team[i])>0) {flag = true; break;}
else st.insert(team[i]);
}
if(flag) continue;
for(int i=R+1; i<N; i++) {
if(st.count(team[i])>0) {flag = true; break;}
else st.insert(team[i]);
}
if(flag) continue;
cout<<L<<' '<<R;
return 0;
}
}
}| # | 결과 | 실행 시간 | 메모리 | 채점기 출력 |
|---|---|---|---|---|
| 결과를 불러오는 중입니다… | ||||
| # | 결과 | 실행 시간 | 메모리 | 채점기 출력 |
|---|---|---|---|---|
| 결과를 불러오는 중입니다… | ||||
| # | 결과 | 실행 시간 | 메모리 | 채점기 출력 |
|---|---|---|---|---|
| 결과를 불러오는 중입니다… | ||||
| # | 결과 | 실행 시간 | 메모리 | 채점기 출력 |
|---|---|---|---|---|
| 결과를 불러오는 중입니다… | ||||
| # | 결과 | 실행 시간 | 메모리 | 채점기 출력 |
|---|---|---|---|---|
| 결과를 불러오는 중입니다… | ||||
| # | 결과 | 실행 시간 | 메모리 | 채점기 출력 |
|---|---|---|---|---|
| 결과를 불러오는 중입니다… | ||||
| # | 결과 | 실행 시간 | 메모리 | 채점기 출력 |
|---|---|---|---|---|
| 결과를 불러오는 중입니다… | ||||
