| # | Time | Username | Problem | Language | Result | Execution time | Memory |
|---|---|---|---|---|---|---|---|
| 1354498 | yyc000123 | Guessing Game (EGOI23_guessinggame) | C++20 | 427 ms | 5024 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=1 ; 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 ;
}| # | Result | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
| # | Result | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
