| # | Time | Username | Problem | Language | Result | Execution time | Memory |
|---|---|---|---|---|---|---|---|
| 1354540 | hsuan._.0528 | Guessing Game (EGOI23_guessinggame) | C++20 | 8 ms | 996 KiB |
//pB
#include<bits/stdc++.h>
using namespace std;
#define LL long long
#define pii pair<int, int>
#define S second
#define F first
const int maxn = 1e6 + 10;
const int inf = 1e9;
int n, p;
int a[maxn];
int cnt[maxn];
signed main(){
ios_base::sync_with_stdio(0); cin.tie(0);
cin>>p>>n;
if(p==1){
cout<<n<<endl;
for(int i=1; i<=n; i++){
cout<<i<<endl;
}
}else{
int x;
for(int i=1; i<=n; i++){
cin>>a[i];
cnt[a[i]]++;
if(cnt[a[i]]>1) x=a[i];
}
for(int i=1; i<=n; i++)
if(a[i]==x) cout<<i<<" ";
}
}| # | Result | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
| # | Result | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
