| # | Time | Username | Problem | Language | Result | Execution time | Memory |
|---|---|---|---|---|---|---|---|
| 1366127 | biserailieva | Carnival (EGOI23_carnival) | C++20 | 48 ms | 3092 KiB |
#include <bits/stdc++.h>
using namespace std;
int main()
{
int n;
cin>>n;
vector<int>V[n];
bool s=true, rev=true;
for(int i=0;i<n-1;i++)
{
vector<int>A;
for(int j=0;j<i+1;j++)
{
int x;
cin>>x;
V[i].push_back(x);
A.push_back(x);
}
sort(A.begin(), A.end());
if(A!=V[i])
{
s=false;
}
reverse(A.begin(), A.end());
if(A!=V[i])
{
rev=false;
}
}
if(rev)
{
for(int i=0;i<n;i++)
{
cout<<i<<' ';
}
cout<<endl;
}
else if(s)
{
for(int i=n-1;i>=0;i--)
{
cout<<i<<' ';
}
cout<<endl;
}
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... | ||||
