Показать все ветки Спрятать все ветки Показать все сообщения Спрятать все сообщения |
Страница 2 |
if you have a unintelligent algorithm where you run through the 3000x3000 table( c++ ) | 👑TIMOFEY👑 | 1249. Древний некрополь | 28 авг 2022 12:38 | 1 |
delete iostream and using namespace std. all cin cout replace on scanf and pritf write in start of code: #define CRT_SECURE_NO_WARNINGS and #include<cstdio> and behind your vectors,pair and queue write std:: do vector WITHOUT ANY INTS, ALL BOOL DONT USE PUSH_BACK its really slow, just write size of vector Example: >std::vector<std::vector<bool>> a(n); >std::vector<bool> b(m); and call with a[i][j] or something else; If you look at other aspects of the task, then EASY BFS |
Is it really needed? | maslowmw | 1249. Древний некрополь | 21 авг 2019 18:33 | 1 |
Is it really needed to set 4mb memory limit? I really must to remember pascal for this task, because the same solution have TL (not a Scanner) or ML on java. May be it's possible to up memory limit to 8mb? |
Use array of bitset | Сонечка | 1249. Древний некрополь | 24 апр 2022 16:01 | 2 |
Or array of vector <bool>. It uses less memory too. |
why am i getting WA in test 12 | Grandmaster | 1249. Древний некрополь | 11 ноя 2017 01:59 | 1 |
#include <stdio.h> #include <iostream> using namespace std; int n, m, segRez[3004]; int segm1[3004]; char segm2[6005]; int main() { cin >> n >> m; for(int i = 0; i < n; ++i){ gets_s(segm2); for(int j = 0; j < m; ++j){ segRez[j] = segm1[j] + int(segm2[j<<1] - 48); segm1[j] = int(segm2[j<<1] - 48); if(j - 1 >= 0 && ((segRez[j - 1]|segRez[j])) == 3){ cout << "No"; return 0; } } } cout << "Yes"; } |
test 6, rejudge, C# | kasarino | 1249. Древний некрополь | 5 июл 2016 09:20 | 1 |
GC.Collect(); on each iteration has helped |
What's wrong? It's working! | Дмитрий | 1249. Древний некрополь | 13 апр 2016 15:57 | 1 |
У меня получилось вот что I have this: > http://ideone.com/8CHWDd Почему проверка считает что ответ неверен Why it's wrong? |
Visual C++ vs. G++ | yongwhan | 1249. Древний некрополь | 11 июн 2016 03:48 | 3 |
Just a passing note: the same exact code gets TLE in G++ but AC in Visual C++ (with a very comfortable margin). Make sure to test your code in both compilers before making a judgement that your code is too slow, for those who are coding in C/C++. That's ridiculous for some reason. TLE in G++ but AC in Visual C++ without a single edit in the source code. wow, the same one problem |
Some tests | [MAI] Dron-elektron | 1249. Древний некрополь | 30 июл 2014 23:49 | 1 |
1 1 0 ==== Yes 1 1 1 ==== Yes 3 1 1 1 0 ==== Yes 3 1 0 0 0 ==== Yes 2 2 0 0 0 0 ==== Yes 2 2 1 0 0 1 ==== Yes 3 3 1 1 1 1 0 1 1 1 1 ==== No 3 3 1 1 1 1 1 1 1 1 1 ==== Yes 3 3 1 0 1 0 1 0 1 0 1 ==== Yes 4 2 1 1 0 0 0 0 1 1 ==== Yes 4 2 1 1 1 0 0 1 1 1 ==== No 4 4 1 0 0 1 0 1 1 0 1 0 0 1 0 1 1 0 ==== Yes 4 4 1 1 1 1 0 0 0 0 1 0 1 1 0 1 0 0 ==== Yes 4 4 1 0 1 0 0 1 0 1 1 0 1 0 0 1 0 1 ==== Yes 4 2 1 1 0 1 1 1 1 1 ==== No |
What is the answer for this test? | Mickkie | 1249. Древний некрополь | 2 мар 2014 20:57 | 1 |
3 3 1 1 1 1 0 1 1 1 1 Yes / No ? |
No subject | Arseniy | 1249. Древний некрополь | 5 июл 2016 08:15 | 2 |
why my O(N * M) solution works for 2.65 seconds? I think 9 * 10^6 operstions should be done faster... Because reading 3000 x 3000 integers takes a lot of time. |
Hint | Hakobyan Tigran (RAU) | 1249. Древний некрополь | 18 янв 2011 23:35 | 1 |
Hint Hakobyan Tigran (RAU) 18 янв 2011 23:35 |
0.89s 129kb AC | muhammad | 1249. Древний некрополь | 1 июн 2010 17:56 | 1 |
|
Страница 1 |
to Admins | Ibragim Atadjanov | 1249. Древний некрополь | 23 сен 2009 22:45 | 3 |
to Admins Ibragim Atadjanov 23 сен 2009 10:27 My prog uses only private static byte[] mat;// max 3000 * 1 byte private static boolean ok;// 1 byte private static byte x, y; // 2 byte private static int n, m, i, j; // 4*4 byte=16 byte field variables its memory cant be 5 510 KB. total memory is 3019 B. I cant understand why i'm getting memory limit on test6 Try to read input strings this way: BufferedReader in = new BufferedReader(new InputStreamReader(System.in)); ......... char[] input_str = new char[2 * m + 2]; ......... in.read(input_str, 0, 2 * m + 1); It help me to get AC with 0.296 sec. and 1662КБ. Good Luck! Edited by author 23.09.2009 17:08 Edited by author 23.09.2009 17:08 Thanks a lot. I got AC by your help |
No subject | KALO | 1249. Древний некрополь | 9 авг 2009 23:32 | 1 |
Edited by author 09.08.2009 23:36 |
what is wrong??? | Rockman | 1249. Древний некрополь | 18 мар 2009 09:11 | 1 |
#include<iostream> using namespace std; int main () { int a[3000],b[3000],c[3000]; long long int i,j,k,n,m; cin>>n>>m; for (i=0;i<n;i++){ cin>>a[i]; for(j=0;j<m;j++){ cin>>a[j]; } { c[j]= a[j] + b[j]; } for (j=0;j<m-1;j++){ if ((c[j] = 1) && (c[j+1] = 2) || (c[j] = 2) && (c[j+1] >= 1)) { cout<<"NO";
return 0; } else { cout<<"YES";} } } return 0; } |
Bad tests | Marginean Ciprian | 1249. Древний некрополь | 30 ноя 2008 21:38 | 2 |
Bad tests Marginean Ciprian 27 ноя 2008 21:04 Please, write letter to timus_support(at)acm.timus.ru and explain why tests in this problem are bad. |
WA4 | rohit | 1249. Древний некрополь | 23 май 2008 04:31 | 1 |
WA4 rohit 23 май 2008 04:31 Please give me some tests. |
why WA21? | Experimenter (Anton Ohitin Orenburg G1) | 1249. Древний некрополь | 13 мар 2008 11:41 | 1 |
why WA21? Experimenter (Anton Ohitin Orenburg G1) 13 мар 2008 11:41 now i have AC. it was very stupid bag..... Edited by author 13.03.2008 16:25 |
Problem 1249 "Ancient Necropol" has been rejudged (+) | Sandro (USU) | 1249. Древний некрополь | 24 окт 2007 14:49 | 1 |
Many tricky testcases were added. 105 authors lost AC after rejudge. Thanks to Andrew Ustinov for new tests. |
Why my program work so slow? | Roma Labish[Lviv NU] | 1249. Древний некрополь | 20 ноя 2007 20:24 | 4 |
I've only read and check, and don't read whole input. Why it work's less then 4 sek? [code deleted] Edited by author 26.01.2007 17:17 Use scanf instead of cin Input file is very big >10MB but better use Pascal:) I don't optimize input at all. It works about 1.3 sec After simple optimization 0.328 sec Edited by author 26.01.2007 16:15 Thank you! I've changed cin to scanf and got AC in 1.5 sec )) Try to use "gets()" instead "scanf()" and "cin". You can solve it with 2 strings (length = 2*m + 2). I've get AC at 0.156 sec. And some solution are faster. |