| # | Time | Username | Problem | Language | Result | Execution time | Memory |
|---|---|---|---|---|---|---|---|
| 1359779 | biserailieva | Guessing Game (EGOI23_guessinggame) | C++20 | 380 ms | 10012 KiB |
#include <bits/stdc++.h>
using namespace std;
int main()
{
ios::sync_with_stdio(false);
cin.tie(nullptr);
int P, N;
cin >> P >> N;
if (P == 1)
{
cout << N - 1 << endl;
int cur = 1;
for (int i = 0; i < N - 1; i++) {
int idx;
cin >> idx;
cout << cur << endl;
cur++;
}
}
else
{
vector<int> A(N);
for (int i = 0; i < N; i++) cin >> A[i];
unordered_map<int, vector<int>> pos;
for (int i = 0; i < N; i++) {
pos[A[i]].push_back(i);
}
for (auto &p : pos) {
if (p.second.size() >= 2) {
cout << p.second[0] << " " << p.second[1] << endl;
return 0;
}
}
}
return 0;
}| # | Result | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
| # | Result | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
