online compiler and debugger for c/c++

code. compile. run. debug. share.
Source Code   
Language
#include<bits/stdc++.h> using namespace std ; int main() { int n,u=0,d=0,r=0; long long int prev=0; long long int input; cin>>n; while(n--) { cin>>input; if (input==prev) { r++; break; } else if(input<prev) d++; else u++; prev=input; } if(((u==0||d==0)||(u==1||d==1))&&r==0) cout<<"true"; else cout<<"false"; return 0; }

Compiling Program...

Command line arguments:
Standard Input: Interactive Console Text
×

                

                

Program is not being debugged. Click "Debug" button to start program in debug mode.

#FunctionFile:Line
VariableValue
RegisterValue
ExpressionValue