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

ProeBos wa#6?????????? [14] // Problem 1794. Masterpieces of World Architecture 16 Oct 2010 16:07
What is it???

Edited by author 16.10.2010 17:42

Edited by author 16.10.2010 17:43
Victor Re: wa#6?????????? [13] // Problem 1794. Masterpieces of World Architecture 21 Oct 2010 04:56
8
1 2 3 5 5 6 7 8

answer 1
Andrey Re: wa#6?????????? [2] // Problem 1794. Masterpieces of World Architecture 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?????????????????
Tigran Hakobyan Re: wa#6?????????? // Problem 1794. Masterpieces of World Architecture 24 Oct 2010 14:55
Try this one
4
1 1 1 2
Your programm output 1 instead of 3
Tigran Hakobyan Re: wa#6?????????? // Problem 1794. Masterpieces of World Architecture 24 Oct 2010 14:58
And your algo is wrong!!!
kirill_SSAU619 Re: wa#6?????????? [9] // Problem 1794. Masterpieces of World Architecture 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
Seitkozhayev Nurlan Re: wa#6?????????? [8] // Problem 1794. Masterpieces of World Architecture 24 Oct 2010 19:30
похоже, что нет.
if(n==8) while(true); он вывел WA, так что там другой тест.
Студенты Re: wa#6?????????? [7] // Problem 1794. Masterpieces of World Architecture 26 Oct 2010 16:08
тогда какой там тест?
Anton Papin Re: wa#6?????????? // Problem 1794. Masterpieces of World Architecture 28 Oct 2010 02:08
There's a test like:

7
3 4 5 6 7 1 1

Answer 6.

Or something kinda this.
Yuri Pechatnov [Barnaul] Re: wa#6?????????? [5] // Problem 1794. Masterpieces of World Architecture 31 Oct 2010 08:46
There are 100 numbers.
Iosif inf-10 Re: wa#6?????????? [4] // Problem 1794. Masterpieces of World Architecture 4 Nov 2010 23:12
12
5 1 2 3 6 3 8 4 10 3 12 7

anaswer  12
grandvic Re: wa#6?????????? // Problem 1794. Masterpieces of World Architecture 22 Apr 2011 01:49


Edited by author 22.04.2011 01:59
ValentinPerm Re: wa#6?????????? [1] // Problem 1794. Masterpieces of World Architecture 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
ValentinPerm Re: wa#6?????????? // Problem 1794. Masterpieces of World Architecture 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
thanks to all))) acept!!!