Показать все ветки Спрятать все ветки Показать все сообщения Спрятать все сообщения |
Data type | Igor Parfenov | 1276. Train | 2 фев 2023 04:16 | 1 |
There were mentioned, that it is required 64-bit integer type. I also add, that it has to be unsigned, otherwise you get WA 8. |
note for who WA#4 | hoan | 1276. Train | 15 окт 2022 10:48 | 4 |
we dont know use the locomotive as a carriage, like: input: 1 1 AA AB output: NO GOOD LUCK!!! Thank you! I got WA#14 but it's in past. =) Thanks too! I've got WA#14 in the past and I've got AC now. It means, be careful that the end should be the same as the locomotive. e.g. if the locomotive is "AA" then the last should be "AA" or "BA", such as "ABBA" with locomotive "AA" is correct but "ABBA" with locomotive "BA" is incorrect. (sorry for my bad English) Thanks! I got WA on Test #14 After reading this,I know my understanding was wrong |
math sol needed | Abid29 | 1276. Train | 7 апр 2021 13:25 | 1 |
AC in 0.015 sec with dp if u r better with math plz reply Edited by author 07.04.2021 13:27 Edited by author 07.04.2021 13:27 Edited by author 07.04.2021 13:27 |
hints | Abid29 | 1276. Train | 7 апр 2021 13:24 | 1 |
hints Abid29 7 апр 2021 13:24 AA=0,AB=1,BA=2,BB=3 cnt[0]=no. of AA,cnt[1]=no. of AB........... int sz=2; if(last letter==A) szvalue=0; if(last letter==B) szvalue=2; define DP[cnt[0]+2][cnt[1]+2][cnt[2]+2][cnt[3]+2][sz]; dp 1,0,0,0,0=1; //for AA dp 0,1,0,0,1=1; //for AB |
Math | lilipottter | 1276. Train | 9 сен 2020 03:01 | 1 |
Math lilipottter 9 сен 2020 03:01 It is said "Tags: dynamic programming" But also there is math approach. In this case solution is simple math formula kind of \sum\sum C(x,y)*C(t,m). Complexity is O(n^2). Good luck. |
wrong answer on test #12 , is there anything special in test #12? | liuyang_elvis | 1276. Train | 3 дек 2019 18:40 | 3 |
my email is LiuyangElvis@gmail.com thanks for help! 10 7 BA AA AA AA AA AA AB AB AB AB AB ANSWER:NO Good luck! |
ACCESS VIOLATION | chaos0000 | 1276. Train | 7 ноя 2015 21:06 | 1 |
i got this on test 08. Does anyone know the test? |
what is test N14? | Rati | 1276. Train | 7 дек 2014 21:52 | 1 |
|
Any hints for this problem? | Ankit Mehta | 1276. Train | 12 апр 2014 23:36 | 1 |
I tried building solution by taking two matrices dpA[i][j] which tells me the count including the carriages from 1 to i of length k ending at A. Similarly I constructed dpB[i][j] (somewhat similar to 0-1 knapsack). But of course this is wrong as my output will depend on the ordering of the carriages in input. Any suggestions if this approach can be corrected or need to think in completely different direction? Thanks! |
What is test 10 ? | Petru Trimbitas | 1276. Train | 27 июл 2012 19:41 | 1 |
|
To Admins | Fcdkbear[VNTU] | 1276. Train | 7 фев 2010 21:49 | 2 |
To solve this problem we must use 64-bit variable. When i wrote in my code "printf("%lld\n",res)" i've got WA on test number 7. But when i wrote "cout<<res<<endl",i've got AC. My friend had the same problem. So what does it mean? Sorry, i must be more careful and write "printf("%I64d\n",res)". |
WA 7, does the result fit in int(32 bits)? | Jurca Razvan | 1276. Train | 14 май 2009 23:25 | 2 |
No, you should use 64 bit type. |
TEST CASE #4 | Damir Ferizovic | 1276. Train | 22 апр 2009 21:52 | 7 |
Well I really don't know where my mistake is.... My solution becomes right solution for a test case like this: IN: 40 39 AB BA AB BB AA AA BB BB BB AA AA AB BA AB BA AB BA AB BA AB BA BA AB BB AA AA BB BB BB AA AA AB BA AB BA AB BA AB BA AB BA OUT: YES EDIT:(5712638724) - my mistake ( i hope this test case is right :) But what ever I do... I become WA on test 4 :S Edited by author 13.04.2009 23:49 Your solution is wrong. My program outputs 5712638724 You are right... My solution ouputs the same. Something is wrong with printf("%lld") on my PC :S The problem continues... WA #4 Edited by author 13.04.2009 23:50 IN: 40 39 AB AB AB AB AB AB AB AB AB AB AB BA BA BA BA BA BA BA BA BA BA AA AA AA AA AA AA AA AA AA AA BB BB BB BB BB BB BB BB BB BB OUT: 8533694884 ???????????????????? If this test case is right then i don't know where i made a mistake in my code :S Thats really frustrating Edited by author 15.04.2009 01:10 Well i needed about 20 submissions to find out the 4 test case.... Now... How can it be that my solution becomes Wrong Result when he outputs the right answer ??? When i make if(n==28 && k==28)cout<<"YES"<<endl<<5889312<<endl; then i become AC on the 4 test case But when my program outputs his result i got WA... but i tested it 4 times on my PC and my solution writes the same answer: 5889312.... thats really frustrating.....reallyy.... Can someone tell me what's wrong???? P.S if someone want's that i post the fourth test case then tell me..... Edited by author 16.04.2009 02:18 Well I'm sure now that something is different between my computer and the judge PC... How can my solution become WA on test case 4, when i get the right answer on my PC??? please... need big help... This one's bugging me as well... Edited by author 22.04.2009 21:58 |
Connecting carriages | Angelwarrior | 1276. Train | 7 апр 2009 21:50 | 1 |
Simple questiong :D I just can't get it, how should we connect carriages? If we have "AA" "BA" "AB" what can we connect "AABA" or "AAAB"??? |
tests | vrandik | 1276. Train | 8 янв 2006 12:53 | 4 |
tests vrandik 1 сен 2004 00:05 What answer must be in this input???: 7 7 AA AA AB AB AB BA BA BA Re: tests Grebnov Ilya[Ivanovo SPU] 1 сен 2004 01:47 Why not YES 6 ? AAAAABBAABBAAB ABBAAAAAABBAAB ABBAABBAAAAAAB AAABBAAAABBAAB ABBAAAABBAAAAB AAABBAABBAAAAB AA(the first one) is the locomotive , not BA(the last one). And your answer made me puzzled for a long time! :( |
Does anybody knows smth. special about Test 13? | Samsonov Alex [USU] | 1276. Train | 17 сен 2005 14:09 | 1 |
|
Fail(Validator) Again | UNKNOWN_LAMER | 1276. Train | 11 авг 2005 00:42 | 3 |
Pascal solution has Fail(Validator) too. (Submit 892937). |
Does somebody know how to do it? | Khlyzov Andrew | 1276. Train | 3 авг 2004 14:32 | 1 |
|