Submission
Status:
PPPPPPPPPP
Subtask/Task Score:
100/100
Score: 100
User: devilpoohs
Problemset: Maximum Adjacent
Language: cpp
Time: 0.002 second
Submitted On: 2026-03-08 15:03:13
#include<bits/stdc++.h>
using namespace std;
int main(){
ios_base::sync_with_stdio(false);
cin.tie(NULL);
int a,b,c;
string temp;
cin>>a>>b>>c;
if(a>b) cout<<a<<' ';
if(b>c and b>a) cout<<b<<' ';
while(true){
cin>>temp;
if((temp[0]>='a' and temp[0]<='z') or (temp[0]>='A' and temp[0]<='Z')){
if(c>b) cout<<c;
// cout<<'a';
break;
}
int d=stoi(temp);
a=b;
b=c;
c=d;
if(b>a and b>c) cout<<b<<' ';
}
return 0;
}