| # | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
|---|---|---|---|---|---|---|---|
| 1354499 | yyc000123 | Guessing Game (EGOI23_guessinggame) | C++20 | 446 ms | 5108 KiB |
#include<bits/stdc++.h>
using namespace std ;
const int N = 1e5+5 ;
int p , n ;
void solve1(){
cout << n-1 << '\n' ;
for(int i=1 ; i<n ; i++){
int x ; cin >> x ;
cout << i << endl ;
}
}
void solve2(){
map<int,int> mp ;
for(int i=0 ; i<n ; i++){
int x ; cin >> x ;
if(mp.find(x)!=mp.end()) cout << i << ' ' << mp[x] << endl ;
else mp[x]=i ;
}
}
int main(){
cin >> p >> n ;
if(p==1) solve1() ;
else solve2() ;
return 0 ;
}| # | 결과 | 실행 시간 | 메모리 | 채점기 출력 |
|---|---|---|---|---|
| 결과를 불러오는 중입니다… | ||||
| # | 결과 | 실행 시간 | 메모리 | 채점기 출력 |
|---|---|---|---|---|
| 결과를 불러오는 중입니다… | ||||
