Show all threads Hide all threads Show all messages Hide all messages |
test for WA6 | vegetable | 1796. Amusement Park | 19 Sep 2021 22:50 | 1 |
|
WA20 Resolved. The task is so easy that I have overcomplicated it and failed to solve quick | Mahilewets | 1796. Amusement Park | 2 Aug 2017 18:26 | 1 |
I was trying to remove from the set first non-zero count money unit that is NOT LESS than ticket But actually the task asks to remove just the FIRST non-zero count money unit If act according to the former strategy you will receive WA20. |
Please give me test 3. I am get WA | Alex | 1796. Amusement Park | 30 Mar 2017 19:36 | 1 |
|
Test #5 | DarkSun1997 | 1796. Amusement Park | 18 Aug 2016 03:27 | 1 |
Test #5 DarkSun1997 18 Aug 2016 03:27 |
Key points of the algorithm | DiG | 1796. Amusement Park | 24 Apr 2016 23:20 | 4 |
1) First of all you have to calculate maximum of tickets the teacher can buy ((amount of money) div (price of one ticket)) 2) Next step you have to find minimum of tickets. You must pick up one banknote with minimum denomination and calculate amount again: in sample test you get 0 1 0 0 0 0 sequence. Then calculate amonut of money again. So, now you can get minimun of tickets ((new amount of money) div (price of one ticket) + 1). 3) So, now you have minimum and maximum of tickets. Just output the number of possible answers in the first line (tMax - tMin + 1) and the variants in ascending order (for i:=tMin to tMax do write(i,' '); Good luck and get AC! this algo get WA on test #13 Edited by author 25.06.2013 23:54 I think you miss one important step: Think hard about how flexible your tickets is. Not just minimum and maximum tickets, otherwise you will still get WA. |
wrong answer #7. | Bahodir | IT of TUIT | | 1796. Amusement Park | 19 Feb 2015 02:51 | 1 |
Please give me test...My code : import java.io.PrintWriter; import java.util.ArrayList; import java.util.List; import java.util.Scanner; public class Park1796_ { public static void main(String[] args) { Scanner in = new Scanner(System.in); PrintWriter out = new PrintWriter(System.out); int a[] = new int[6]; int max = 999999999, k = 0; for (int i = 0; i < a.length; i++) { a[i] = in.nextInt(); if (a[i] != 0 && a[i] < max) { max = a[i]; k = i; } } int b = in.nextInt(); int sum = 0; sum += a[0] = 10 * a[0]; sum += a[1] = 50 * a[1]; sum += a[2] = 100 * a[2]; sum += a[3] = 500 * a[3]; sum += a[4] = 1000 * a[4]; sum += a[5] = 5000 * a[5]; switch (k){ case 0: k = 10; break; case 1: k = 50; break; case 2: k = 100; break; case 3: k = 500; break; case 4: k = 1000; break; case 5: k = 5000; break; } int l = 0, d = sum - k; int count = 0, f = 0; f = d / b + 1; while (f * b <= sum && f * b >= d){ out.print(f + " "); count++; f++; } System.out.println(count); out.flush(); } } Edited by author 19.02.2015 03:01 |
If WA #6 | DKarev | 1796. Amusement Park | 9 Jan 2015 19:55 | 2 |
First make the sum to determinate MIN and MAX money the teacher wanted to give. Then divide it by the price of one ticket. Do it in this order. Hope I helped! :) |
WA 3 | Olya | 1796. Amusement Park | 12 Dec 2014 18:22 | 1 |
WA 3 Olya 12 Dec 2014 18:22 What is WA 3 Test. Give me please some example |
Can anybody clarify this to me? | Tural Neymanov | 1796. Amusement Park | 28 Apr 2014 06:02 | 3 |
Is such an input possible? 2 0 0 0 1 0 100 this means that teacher gave 1020 but the 20 that were given were unnecessary, and it's said that every note is needed. Thanks. No. Btw, my AC solution gives 0 on this test. That, there not such test case here. Because your code should be wrong. The answer for this is : 1 10, which is my AC code give, and should be as we calculate by ourselves. But according to the question statement, it should not give such test cases. Because the teacher would not give unnecessary money. Edited by author 28.04.2014 06:04 |
If you have WA in test 13 - see here | grigorii | 1796. Amusement Park | 1 Oct 2013 18:30 | 1 |
test: 0 3 0 0 0 0 33 answer: 1 4 |
If you have WA4 - see this test | Leonid (SLenik) Andrievskiy | 1796. Amusement Park | 25 Jun 2013 23:34 | 4 |
Test 0 0 0 0 0 1 499 Answer 10 1 2 3 4 5 6 7 8 9 10 This is not the test 4, because I've the same problem but my program does this test correctly. |
problem in test 6 | panic | 1796. Amusement Park | 1 Jan 2013 22:02 | 5 |
i have a problem in test 6, can't find ,whats the matter?!?! help plz!! it's prob-ly test 0 0 0 0 0 0 1 No, you aren`t right. 0 0 0 0 0 0 - is invalid test case. Feature of test #6 is that ticket coast is greater then minimal nominal of bank notes set present. my English is not very good. I don't think that i understand your statement clearly. Can you explain it or give sample test for your statement. Tks. |
WA1 ??? | Hi4ko | 1796. Amusement Park | 2 Aug 2012 16:04 | 2 |
why is it so? #include <iostream> #include <cmath> using namespace std; int main() { int value[]={ 10, 50, 100, 500, 1000, 5000 }; int num[5],sum=0; int price; for(int i=0;i<6;i++) { cin>>num[i]; sum+=num[i]*value[i]; } cin>>price; int i=0; while(num[i]==0) ++i; int lol=0,lol1=0; while(lol*price<=sum-value[i]) ++lol; int j=0; int k=0; while((lol+k)*price<=sum) { ++lol1; ++k; } cout<<lol1<<endl; while((lol+j)*price<=sum) { cout<<lol+j<<" "; ++j; } } #include <iostream> #include <cmath> using namespace std; int main() { int value[]={ 10, 50, 100, 500, 1000, 5000 }; int num[5],sum=0; int price; for(int i=0;i<6;i++) { cin>>num[i]; sum+=num[i]*value[i]; } cin>>price; int i=0; while(num[i]==0) ++i; int lol=0,lol1=0; while(lol*price<=sum-value[i]) ++lol; int j=0; int k=0; while((lol+k)*price<=sum) { ++lol1; ++k; } cout<<lol1<<endl; while( i < lol1 ) { cout << lol + j << " "; j++; i++; } cout << lol + j << endl; } |
WA 20 | CapAwsome | 1796. Amusement Park | 24 Jun 2012 00:06 | 1 |
WA 20 CapAwsome 24 Jun 2012 00:06 |
Please explain to me the second example. | 3a[3.141592..]Jlu | 1796. Amusement Park | 12 Feb 2012 16:43 | 3 |
I don't undestand why answer 1 11? I think answer is 6 6 7 8 9 10 11. Thanks. I don't undestand why answer 1 11? I think answer is 6 6 7 8 9 10 11. Thanks. The conditions states: "It is assumed that the teacher didn't give extra notes, which means that there would not be enough money for the tickets if any of the notes was taken away." That means if the smallest banknote (10 rubbles) is taken away, the money would not be sufficient for the amount of tickets she wanted to buy. She wanted 11 tickets, no less. Thank you for the correct explanation. Edited by author 12.02.2012 16:58 Edited by author 12.02.2012 16:58 |
tle on test 5 please help pascal | amirani | 1796. Amusement Park | 18 Jan 2012 17:50 | 1 |
var i,k,j,p,min,q,x,n:integer; a,b:array [1..6] of integer; c:array [0..6] of integer; t:boolean; begin min:=32000; a[1]:=10; a[2]:=50; a[3]:=100; a[4]:=500; a[5]:=1000; a[6]:=5000; n:=6; for i:=1 to n-1 do begin read (b[i]); x:=x+b[i]*a[i]; end; readln (b[n]); readln (k); t:=false; i:=1; while not t do begin while (i<=n) and (c[i]>=b[i]) do begin c[i]:=0; inc(i); end; if i>n then begin t:=true; continue; end; inc(c[i]); for j:=1 to n do p:=p+c[j]*a[j]; if p=k then begin q:=p; break; end; if p>=k then begin for j:=1 to i-1 do c[j]:=0;
end else i:=1; if (p>=k) and (p-k<min) then begin min:=p-k; q:=p; end; end; q:=(x-q) div k; writeln ((x div k)-q); for i:=q+1 to x div k do write (i,' '); end. |
Can someone please tell what is in test #16? | bigtik | 1796. Amusement Park | 14 Nov 2011 19:16 | 1 |
Can someone please tell what is in test #16? |
What is test #6 ??? | bigtik | 1796. Amusement Park | 14 Nov 2011 18:55 | 1 |
can someone please tell what is in test #6? |
WA8 Help | nednedned | 1796. Amusement Park | 17 Oct 2011 23:52 | 1 |
Please, help with test 8!.. Don't know what do( |
problem in test 8 | Nguyen Dang Duy | 1796. Amusement Park | 17 Oct 2011 23:09 | 2 |
I have a problem in test 8. Could someone give me a hint? :( |