# URI Online Judge Solution 1062 Rails – Solution in C, C++, Java, Python and C#

### URI Online Judge Solution 1002 Area of a Circle – Solution in C, C++, Java, Python and C#

URI Online Judge Solution 1062 Rails | Data Structure

Problem Name: 1062 Rails solution
Problem Number : URI – 1062 Rails code
Online Judge : URI Online Judge Solution
Category: Data Structure
Solution Language : C,C plus plus, java, python, c#(c sharp)

### URI 1062 problem simple input output:

 Input Sample Output Sample 55 4 3 2 11 2 3 4 55 4 1 2 3061 3 2 5 4 600 YesYesNo Yes

### URI Solution 1062 Rails Code in CPP / URI 1062 in C++:

``#include <cstdio>#include <stack>using namespace std;#define sc1(a) scanf("%d", &a)#define fr(i, a, n) for(int i = (a); i < (n); i++)#define fe(i, a, n) for(int i = (a); i <= (n); i++)typedef stack<int> si; int vet[1005];int main(int argc, char const *argv[]){ int i, curr, n, top; while(sc1(n) && n) {  while(sc1(vet[0]) && vet[0])  {   fr(i, 1, n)    sc1(vet[i]);   si p;   curr = 0;   fe(i, 1, n)   {    p.push(i);    while(p.size() > 0 && vet[curr] == p.top())    {     curr++;     p.pop();    }   }   (p.size() == 0) ? puts("Yes") : puts("No");  }  printf("n"); } return 0;}``

### URI Solution 1062 Rails Code / URI 1062 solution in  C# (C Sharp):

Demonstration:

Just implement this in coding. Since having any problem just put a comment below. Thanks

Tags: URI Online Judge Solution, URI OJ Solution list, URI Problems Solution, URI solver, URI all problem solution list, URI 1062 Rails  code in C, URI 1062 Rails code in C++, URI 1062 Rails  solution in C, URI solution, URI 1062 Rails solution in C,URI 1062 Rails solution in C++-CPP,URI 1062 Rails solution in C# (C sharp),URI 1062 Rails solution in Java,URI 1062 Rails solution in Python,

#### By Maniruzzaman Akash

Maniruzzaman Akash is a freelance web developer with most popular Laravel PHP frameork and Vue JS