| Show all threads Hide all threads Show all messages Hide all messages |
| note for who WA#4 | hoan | 1276. Train | 15 Oct 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 |
| My code is getting Wrong answer 5 despite getting correct answers for all possible cases. | classenemy | 1014. Product of Digits | 14 Oct 2022 13:40 | 2 |
Whats wrong with anything here? #include <bits/stdc++.h> using namespace std; using ll=long long; using ui=unsigned int; int main() { //ios::sync_with_stdio(0); //cin.tie(0); ll n;cin>>n; if(!n){ cout<<10; return 0; } else if(n<10){ cout<<n; return 0; } vector<int>v; ll l=n; for(bool q=1;q;){ q=0; for(ll i=9;i>1;i--){ if(l%i==0){ l/=i; v.push_back(i); q=1;
} } } v.push_back(l); sort(v.begin(),v.end()); if(v[0]==1)for(int i=1;i<v.size();i++)cout<<v[i]; else cout<<-1; return 0; } Ok later I figured out that instead of dividing by all the numbers consecutively, dividing by the current factor between 2 to 9 repeatedly until it isn't a factor provides the fewest digits. For example, input 1000000 gives 245555558 in the above program, whereas 2 and 4 could be replaced by 8 for better result. Edited by author 14.10.2022 13:41 |
| If you have WA @ 22 | Kaylin | 1527. Bad Roads | 14 Oct 2022 01:33 | 3 |
i had wa 22 for many times , & i finally found my fault & then got AC . my fault is that i didn't find the exact edge (with the same ci & ti & hi) it used . remember there are many different edges between a (ui , vi) . I've encountered another problem on case 22: the maxtime parameter in that case is not <= 1000000 (as the task description says it should be); it seems that maxtime = 1087380 for this test case. The incorrect test #22 has been fixed. |
| let me know if there is a test case in that the any first number of A , B, C is 0 | m2m | 1511. Fiscal Operations | 14 Oct 2022 01:15 | 10 |
let me know if there is a test case in that the any first number of A , B, C is 0 Please make clear that Edited by author 16.12.2006 14:06 Edited by author 16.12.2006 14:06 Edited by author 16.12.2006 14:07 I'm not sure in it. When I stopped removing leading zeros, I got AC instead of WA. Probably, it's my bug, of course. According to problem statment A, B, C >= 1. Anyway, I faced a test with leading zero in input numbers (test 15). I don't know if it was just 0 or something like 0123 or even 0000 :) I removed that trap, and did not allow 0 in the very first digit of a number even if it was zero before. Got AC. I've cut my check whether there are leading zeroes in all numbers and passed 15th test. What's wrong with it? Re: WA15 Vassenbaher [IU7.BMSTU] 22 Aug 2010 04:11 I had problems with WA#15. The next test was useful 00001 50001 100002 Answ=5 I've got accepted and my program will fail every test with input having leading zero (for example the test 00001 50001 100002 above). So in my opinion there's no leading zero in input I think #15 test is about ??0?? just like this ↓ 1 100 999 100's first '0' is the problem I can't AC because I deal with this 'carry-over' mistakenly. answer:25 maybe it can help somebody~ Test #15 was incorrect with A=0. It is now fixed. |
| I know the agorithm, but who can prove it? | starforever | 1077. Travelling Tours | 13 Oct 2022 14:57 | 6 |
let N be the node num of the graph. so why the maximum cycle number is M-N+1? where M is the edge num. please... o, sorry, I made a mistake... The correct formula is M-N+K, where K is the number of connected components of given graph. Why is not the question, if you know algo of building all these cycles... Edited by author 13.10.2022 15:00 Edited by author 13.10.2022 15:00 |
| Clarifications | Tom | 1077. Travelling Tours | 13 Oct 2022 14:15 | 1 |
I found the problem statement a little hard to understand, and I want to make some clarifications for anyone who is having difficulties. 1. We are looking for the maximum number of cycles such that each of these chosen cycles has at least one edge which is not included in any other chosen cycle. 2. The graph is not necessarily connected. I originally thought that we had to choose the maximum number of cycles which have at least one edge not included in all other chosen cycles. Hope this can help people. |
| Test #30 removed | Vladimir Yakovlev (USU) | 1522. Factory | 12 Oct 2022 03:15 | 1 |
Test #30 was found to be incorrect. It has been removed. The failing solutions have been rejudged. |
| Sqrt decomposition 0.062s =D | InstouT94 | 1439. Battle with You-Know-Who | 12 Oct 2022 01:07 | 1 |
|
| Подскажите, пожалуйста, что не так с кодом? Wrong answer, тест 3. | Юля | 1820. Ural Steaks | 9 Oct 2022 18:51 | 1 |
Подскажите, пожалуйста, что не так с кодом? Wrong answer, тест 3. Edited by author 09.10.2022 19:48 Edited by author 09.10.2022 19:48 |
| Hint | Конобейцев Иван Олегович | 1124. Mosaic | 9 Oct 2022 14:42 | 1 |
Hint Конобейцев Иван Олегович 9 Oct 2022 14:42 Amount of pieces to move, edges to make euler path(only pieces with (in[i] + out[i]) > 0) and amount of components |
| WA29 | popolwooh | 1643. Attack of the Dark Fortress | 8 Oct 2022 13:41 | 3 |
WA29 popolwooh 6 Aug 2015 16:04 Try this test (if you look neighbour cells in order from -1 left -1 up (11 oclock) clockwise) 4 4 #A#. #A!. ##.# .*$. This test also helps with WA3 3 6 !AB#B* #####. $..... out: 6 |
| solution | Berezhko German | 1905. Travel in Time | 7 Oct 2022 10:48 | 3 |
solution Berezhko German 14 Oct 2012 12:52 dfs or bfs is the correct idea? oh, i'm done with it (: Edited by author 15.10.2012 15:14 Edited by author 15.10.2012 15:22 Edited by author 14.10.2012 16:49 Yes, it's BFS with plenty of binary searches to build initial graph. |
| Give me more tests | SK1 | 1223. Chernobyl’ Eagle on a Roof | 6 Oct 2022 21:42 | 10 |
I've got AC. If you have WA check 100 512. (Answer is 10) my programm gives a right answer 10 on 100 512 and though it doesn't pass 1 test Try this: 1 100 = 100 2 100 = 14 3 100 = 9 4 100 = 8 5 100 = 7 6 100 = 7 2 3 = 2 7 999 = 11 Ononism is the best way to pass your free time!!! Isn't it? Pops must die!!! ROCK FOREVER!!! Punks NOT dead!!! HM... IT's so interesting... Edited by author 30.11.2005 18:20 When I buy my wife, she was fifteen - she was nice, her vagin work well, and she was good at the plow. But one year later her voice go deep, she become hair on her chest, and her vagin hang like a sleeve of a wizard... Sad, isn't it? When I buy my wife, she was fifteen - she was nice, her vagin work well, and she was good at the plow. But one year later her voice go deep, she become hair on her chest, and her vagin hang like a sleeve of a wizard... Sad, isn't it? Баран! Edited by author 11.04.2014 14:21 |
| Бинаркой считать количество яиц? | Артём | 1223. Chernobyl’ Eagle on a Roof | 6 Oct 2022 21:21 | 2 |
Если я правильно понимаю, надо посчитать количество яиц, необходимых для поиска E бинаркой, а если оно окажется больше количества яиц в гнезде, то вывести количество этажей? |
| (C++) Why runtime error happened? | ThomasLin | 1001. Reverse Root | 6 Oct 2022 14:08 | 1 |
#include <iostream> #include <vector> #include <iomanip> #include <cmath> using namespace std; int main (){ double Input=0 ; double number[] ; int counter=0; while ( cin >> Input && Input != EOF){ number[counter] = Input; cout << number[counter]; counter++ ; } for (int i=counter ; i>0; i--){ cout << setprecision(4) << sqrt (number[counter]) << endl; } } |
| WA#8 | Piyush | 2056. Scholarship | 5 Oct 2022 11:35 | 1 |
WA#8 Piyush 5 Oct 2022 11:35 #include <bits/stdc++.h> using namespace std; signed main(){ int n; cin>>n; int sum=0; for(int i=0;i<n;i++){ int x; cin>>x; sum+=x; } double cnt1=(double)sum/(double)n; if(cnt1==3){ cout<<"None"; }else if(cnt1==5){ cout<<"Named"; }else if(cnt1>=4.5 && cnt1!=5){ cout<<"High"; }else if(cnt1!=3 && cnt1!=5 && cnt1<4.5){ cout<<"Common"; } } getting a wrong answer on test 8 |
| if u have wa 19 | 👑TIMOFEY👑`~ | 1060. Flip Game | 4 Oct 2022 20:24 | 1 |
i use clear binmask as in 1122, but in 1122 u can chek for answer your board by every change of bit, BUT in THIS problem, u need check board when you finish your changes with bits. Example u have bits 1101 and next is 1110, u firstly change 1111 and then 1110 (two iterations because we need to do this iterations on board) so if u do check on every that iteration its wa19 |
| if u have WA 8 | 👑TIMOFEY👑`~ | 1060. Flip Game | 4 Oct 2022 20:19 | 1 |
|
| TO ADMINS | 👑TIMOFEY👑`~ | 1122. Game | 4 Oct 2022 20:15 | 1 |
On test bwwb bbwb bwwb bwww My program gives 3, but right ans is 4 this test from 1060 |
| Test for WA 5 | 🎧 Vadim Barinov \Frez_Fstilus/'``' :) | 1968. Glass Pyramid | 2 Oct 2022 19:54 | 2 |
Test for WA 5 🎧 Vadim Barinov \Frez_Fstilus/'``' :) 3 Dec 2016 23:26 //Input: 12 10 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 1 1 0 0 0 0 0 2 3 1 1 1 0 0 0 0 0 2 4 2 0 0 0 0 0 0 0 0 2 3 1 0 0 0 0 0 0 0 0 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 //Correct output: WWWWW WRWWW WWRWW WWWWW WWWWW WWWWW WRRW WRWW WWWW WWWW WWWW RWW WWW WWW WWW RW WW WW W W Another one: 8 12 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 |