Показать все ветки Спрятать все ветки Показать все сообщения Спрятать все сообщения |
TLE 7 | 👑TIMOFEY👑 | 1107. Складская задача | 4 авг 2023 11:43 | 1 |
TLE 7 👑TIMOFEY👑 4 авг 2023 11:43 I tried many times and I got TLE7, on code with cin cout, and the visual studio compiler. BUT with this input only 5 million numbers. It should not give TLE (I used ios and tie), which is more strange in g++, ABSOLUTELY the same code gives AC, with a time of 0.187, the code is MORE THAN 5 TIMES FASTER! I understand that g++ and visual differ a lot in terms of compiler settings, but to have such a big difference, I'm just shocked. I am very interested to find out why this is happening. Usually visual is faster, it is very interesting to find out which settings and in which cases make the compiler faster. |
wa3 | 👑TIMOFEY👑 | 1107. Складская задача | 4 авг 2023 11:29 | 1 |
wa3 👑TIMOFEY👑 4 авг 2023 11:29 you don't understand what your code does at all try to think more |
algebra, O(N) | esbybb | 1107. Складская задача | 26 ноя 2016 14:50 | 1 |
try to reproduce the out in sample |
why TLE while just scanning the input data using scanf | ick2 | 1107. Складская задача | 30 июл 2016 18:20 | 1 |
I just use the scanf to read the input data. Why do I also receive a TLE response? |
[removed] | dangminhhieu78 | 1107. Складская задача | 2 июн 2015 21:42 | 1 |
Edited by author 11.06.2015 18:48 Edited by author 11.06.2015 18:48 |
cin/cout in 0.312s | ASK | 1107. Складская задача | 21 мар 2014 17:01 | 1 |
#define I(x) int x; cin >> x #define F(i,n) for(int i = 0; i < (n); ++i) int main(){ cin.sync_with_stdio(false); I(n); I(k); I(m); cout << "YES" << endl; F(i,k){ I(s); F(i,s){ I(x); //... |
Переход с компилятора Intel C++ 7 на компиляторы G++ 4.7.2 и Visual C++ 2010 | Vasilenko Oleg Sergeevich, Chelyabinsk | 1107. Складская задача | 14 окт 2013 17:46 | 2 |
Уважаемые администраторы сайта! Подскажите, пожалуйста, что Вы собираетесь делать с посылками, которые получали AC на компиляторе Intel C++ 7, и получают Time Limit на компиляторах G++ 4.7.2 и Visual C++ 2010? У меня, например, около 4-5 таких задач было, пришлось все их перерешивать по-другому. Ведь теперь нет возможности отправить задачу на старом компиляторе. Извиняйте, но тогда нужно перетестировать посылки под Intel C++ 7 на новых компиляторах, а то результаты и рейтинг получаются НЕЧЕСТНЫМИ !!! Ведь не все перерешивают уже "сданные" задачи. Нельзя переводить старые решения на новые компиляторы, потому что половина из них не откомпилируется или станет выводить другие ответы. |
Can anybody help me with an idea for this problem? | bleah | 1107. Складская задача | 6 сен 2011 17:41 | 4 |
If there whould be no cicles then a topological sort would do the job but I can't figure out how to solve the problem ... > > If there whould be no cicles then a topological sort would do the > job but I can't figure out how to solve the problem ... look@ mine: Var i,k,t :word; begin readln(i,k,t); writeln('YES'); for i:=1 to k do begin readln(t); writeln(2-(t mod 2)); end; end. !!!! > > If there whould be no cicles then a topological sort would do the > job but I can't figure out how to solve the problem ... look@ mine: Var i,k,t :word; begin readln(i,k,t); writeln('YES'); for i:=1 to k do begin readln(t); writeln(2-(t mod 2)); end; end. !!!! It's stupid text... get WA1 & Locomotive didn't get AC There is very simple idea how distribute all K sets to these M shops.It can to do in one line of code, very important that N<M! (Of course, answer YES always) Edited by author 06.09.2011 17:53 |
idea | muhammad | 1107. Складская задача | 9 июл 2011 02:25 | 2 |
idea muhammad 7 фев 2011 21:07 (a+b)%c!=a%c where c>b (a+b)%c!=(a+p)%c where c>b&&c>p cute problem. but how could someone ac in 0.046 sec? mine was 0.625 pls share faster idea of solution Try to use fread to get the data instead of scanf it may reduce time from 0.625 to 0.062 |
AC :) | Burunduk1 | 1107. Складская задача | 9 июн 2011 02:31 | 9 |
AC :) Burunduk1 5 мар 2006 01:21 Very good problem :) Short and beauty. † YES † ACM.Tolstobrov_Anatoliy[Ivanovo SPU] 5 мар 2006 01:32 Re: † YES † Nika Jimsheleishvili (Tbilisi SU) 5 мар 2006 19:11 Really good math problems. Like 1040. Better :) (1040 has incorrect statement. In 1040 it is not said that graph is connected) Sorry. Now it is aleady fixed. But when I solved it, it took up one week to understand why percent of AC is so high... :( Edited by author 05.03.2006 20:51 Re: † YES † Nika Jimsheleishvili (Tbilisi SU) 6 мар 2006 16:12 ... and which are the best problems on this site ? YES! ftc 20 июл 2006 15:35 Really, really beautiful problem! Re: YES! Dmitry "Logam" Kobelev [TSOGU] 5 сен 2008 10:54 Thank you guys, your posts about "beautiful problem" charged me up to solve it))) |
I am sure that there is no test in which we must output NO!!!! | Tigran92(Rau) | 1107. Складская задача | 18 окт 2010 23:38 | 1 |
|
Do not use cin & cout! the inputs are so huge & you'll get TLE! | wrbuaa2005 | 1107. Складская задача | 14 авг 2008 18:39 | 1 |
|
Help | AXIS | 1107. Складская задача | 29 июл 2008 16:52 | 2 |
Help AXIS 10 янв 2007 22:39 As i've understood none of the sets with equal number of good can be similar. But with this assumption, i've got WA1 all the time. Help! Re: Help Denis Koshman 29 июл 2008 16:52 Sets 1 2 and 4 5 are dissimilar |
1107 Trying to solve | svr | 1107. Складская задача | 29 июл 2008 16:51 | 3 |
1. First of all it seems that YES alltimes; 2. Secondly evident that we should find partition of set of all possiible multisets of products not only given K~50000; 3. Let P(i,A)- predicate for i-th subdivision of the partition. 1<=i<=N+1. Eqution P(i,A)==1 must become wrong if we add any element to A or raplace any element in A. It seems that |A| mod(N+1) has this stable property. At first I was suprised by your statement that the answer is always YES.. But then I saw that M>N in problem statement, that makes life a lot easier! :) My current thoughts are about assiging shops to some dedicated type of goods. |
Is a set similar to itself? | Denis Koshman | 1107. Складская задача | 29 июл 2008 16:22 | 2 |
Don't mind... the sets are different in problem statement :) |
1107 | IGOR_Lviv NU | 1107. Складская задача | 8 июл 2007 21:52 | 1 |
1107 IGOR_Lviv NU 8 июл 2007 21:52 Nice problem... Edited by author 08.07.2007 21:56 |
Question about "similar" (+) | Samsonov Alex [USU] | 1107. Складская задача | 10 авг 2006 21:11 | 3 |
Why "1 2 3 4" is similar to "1 2 3 4 2" ans is not similar to "1 1 2 3 4". The first set is obtained from these two by deleting "2" or "1" respectively. What do I misunderstand? "1 2 3 4" and "1 1 2 3 4" are similar. Read the task one more time :) Good luck! |
What a strange problem! | Sandro | 1107. Складская задача | 8 авг 2006 13:56 | 4 |
This problem seems to be very strange. The graph theory sais that it always has a solution. But I think, that any algorithm works slower than O(K^2) and for K=50000 it is TLE. The O(K) algorithm (like Locomotive's one) is obviously incorrect, because gives the wrong answer even in a sample input. (The first two sets in sample input: 1 3 5 6 4 and 1 3 5 6 3 are similar, but his program sais that I must send these sets to shop №1.) The problem sais that two sets are "similar" if one of them is obtained by deleting one good form the second set or by replacing one good to another. But if the similar sets can be obtained only by deleting one good, the Locomotive's solution is correct. Maybe the problem text is incorrect, or there is no tests with K=50000 (so I can solve it, finding the minimal number of colors to paint this graph in O(K^2)). Who can tell me, why I am wrong? Edited by author 07.08.2004 11:57 Obvious correct solution is O(input_size) Is locomotive's the correct solution? If the text is correct,why 1 2 3 4 and 1 5 4 3 can be put in the same shop in his answer? They are similar! Read problem statement carefully, and you'll easily solve this task: there are k DIFFERENT set of goods in the warehouse... Edited by author 08.08.2006 13:58 |
the problem seems very long,but it's very esay | shenlulu | 1107. Складская задача | 7 авг 2006 19:05 | 2 |
|
Will anybody explain what "similar" means at last ? | Krayev Alexey(PSU-Again) | 1107. Складская задача | 5 янв 2006 21:32 | 1 |
|