ENG  RUSTimus Online Judge
Online Judge
Problems
Authors
Online contests
About Online Judge
Frequently asked questions
Site news
Webboard
Links
Problem set
Submit solution
Judge status
Guide
Register
Update your info
Authors ranklist
Current contest
Scheduled contests
Past contests
Rules
back to board

Discussion of Problem 1794. Masterpieces of World Architecture

wa#6??????????
Posted by ProeBos 16 Oct 2010 16:07
What is it???

Edited by author 16.10.2010 17:42

Edited by author 16.10.2010 17:43
Re: wa#6??????????
Posted by Victor 21 Oct 2010 04:56
8
1 2 3 5 5 6 7 8

answer 1
Re: wa#6??????????
Posted by ANDREY TRUBIN 24 Oct 2010 13:12
#include <iostream>
#include <math.h>
using namespace std;
int main()
{

long i,n,a[102020],b[102020],t=0,u,r=1,e;
cin >> n;

for (i=1;i<=n;i++){cin >> a[i];};
for (i=1;i<=n;i++){b[i]=0;};
for (i=1;i<=n;i++){if (a[i]==1){cout << i; goto lkj;};};
for (i=1;i<=n;i++){b[a[i]]++;if (b[a[i]]==2){cout << i; goto lkj;};};

lkj: ;
cin >> i;
return 0;
}




WHY AN ERROR?????????????????
Re: wa#6??????????
Posted by Tigran92[RAU] 24 Oct 2010 14:55
Try this one
4
1 1 1 2
Your programm output 1 instead of 3
Re: wa#6??????????
Posted by Tigran92[RAU] 24 Oct 2010 14:58
And your algo is wrong!!!
Re: wa#6??????????
Posted by kirill_SSAU619 24 Oct 2010 18:17
Victor wrote 21 October 2010 04:56
8
1 2 3 5 5 6 7 8

answer 1
It is the test number 6???


Edited by author 24.10.2010 18:26
Re: wa#6??????????
Posted by Nurlan(IITU) 24 Oct 2010 19:30
похоже, что нет.
if(n==8) while(true); он вывел WA, так что там другой тест.
Re: wa#6??????????
Posted by Студенты 26 Oct 2010 16:08
тогда какой там тест?
Re: wa#6??????????
Posted by Anton Papin 28 Oct 2010 02:08
There's a test like:

7
3 4 5 6 7 1 1

Answer 6.

Or something kinda this.
Re: wa#6??????????
Posted by Yuri.Pechatnov 31 Oct 2010 08:46
There are 100 numbers.
Re: wa#6??????????
Posted by Iosif inf-10 4 Nov 2010 23:12
12
5 1 2 3 6 3 8 4 10 3 12 7

anaswer  12
Re: wa#6??????????
Posted by grandvic 22 Apr 2011 01:49


Edited by author 22.04.2011 01:59
Re: wa#6??????????
Posted by Valentin (PSU) 3 Oct 2011 17:21
>> 12
>> 5 1 2 3 6 3 8 4 10 3 12 7

Why answer 12, but not 2?

Edited by author 03.10.2011 17:22
Re: wa#6??????????
Posted by Valentin (PSU) 3 Oct 2011 18:49
I understand... Because 6 . 8 . 10 . 12 maximum ordered subsequence
and sequence
7 5 1 2 3 6! 3 8! 4 10! 3  12!
1 2 3 4 5 6! 7 8! 9 10! 11 12!

Edited by author 03.10.2011 18:51
Re: wa#6??????????
Posted by ProeBos 6 Oct 2011 00:24
thanks to all))) acept!!!