| # | Time | Username | Problem | Language | Result | Execution time | Memory |
|---|---|---|---|---|---|---|---|
| 1367313 | lex._. | Subset Mex (EGOI22_subsetmex) | C++20 | 1 ms | 348 KiB |
#include <iostream>
#include <fstream>
#include <vector>
#include <algorithm>
#define NMAX 50
using namespace std;
long long f[NMAX];
int main()
{
ios_base::sync_with_stdio(false);
cin.tie(nullptr);
int t;
cin >> t;
while(t--)
{
int n;
cin >> n;
for(int i=0; i<n; i++)
{
cin >> f[i];
}
int cnt=1;
for(int i=n-1; i>=0; i--)
{
f[i]-=cnt;
if(f[i]<0) cnt+=-f[i];
}
cout << cnt << "\n";
}
return 0;
}| # | Result | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
| # | Result | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
| # | Result | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
| # | Result | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
| # | Result | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
| # | Result | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
| # | Result | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
| # | Result | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
