You are not logged in. Please login at www.codechef.com to post your questions!

×

where am i wrong PERMUT2

#include <iostream>

include<string.h>

using namespace std;

int main() { int t,flag; long int n; int a[100000],b[100000]; for(int i=1;n!=0;i++) { cin>>n; for(int j=1;j<=n;j++) { a[j]=n-j+2; a[1]=1; cin>>b[j];} for(int j=1;j<=n;j++) { flag=0; if(b[j]!=a[j]) { cout<<"not ambiguous"<<endl; break; } else flag=1; } if(flag==1&&n!=0) { cout<<"ambiguous"<<endl; } } return 0; }

asked 17 Sep '17, 15:33

harshitbhalla's gravatar image

1★harshitbhalla
32
accept rate: 0%

edited 17 Sep '17, 15:44


Its hard to read your code this way can u upload the coe then send the link!

link

answered 17 Sep '17, 16:27

phantomhive's gravatar image

4★phantomhive
944
accept rate: 0%

toggle preview
Preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported
  • mathemetical formulas in Latex between $ symbol

Question tags:

×31

question asked: 17 Sep '17, 15:33

question was seen: 126 times

last updated: 17 Sep '17, 16:27