Submission
Status:
PP-PPPPPP-
Subtask/Task Score:
80/100
Score: 80
User: iAOMNC
Problemset: Maximum Adjacent
Language: cpp
Time: 0.002 second
Submitted On: 2025-11-10 11:28:16
#include<bits/stdc++.h>
using namespace std;
int main()
{
vector<int> a;
a.push_back(INT_MIN);
int i=0;
string b;
while(1>0)
{
cin >> b;
if(b[0]>='A')
{
break;
}
else
{
int k=stoi(b);
a.push_back(k);
}
i++;
}
a.push_back(INT_MIN);
for(int y=1;y<i;y++)
{
if(a[y+1]<a[y]&&a[y-1]<a[y])
{
cout << a[y]<<" ";
}
}
}