Common BoardWe have to perform some service works with Timus Online Judge. So for a couple of days solutions could be checked with delays up to several hours. Just keep patience. Hi What heppened???! I submit one problem in past day,but it doesn,t judge still!!! Edited by author 02.09.2015 13:11 Hi, please give ETA when service will be up again? Thanks in advance. Edited by author 02.09.2015 13:07 The system which is used to actually test solutions is being migrated from one datacenter to another. Unfortunately, it took long time to perform. Currently system is up and running at new location but so far there is a connectivity issue (web-server does not see checker system) which is being resolved right now. I expect to finish is today but can not give any guarantee as the process requires some actions from UrFU system administrators (that where we can make no prediction). Sorry for inconvenience. But this migration was unavoidable. Edited by author 02.09.2015 14:49 Unfortunately, connectivity issue has not been resolved yet. I still hope that it will be solved tomorrow. Shit -_- We are still waiting.... Интересно, до конца недели точно восстановят, или 50/50? Bad news from administrators. They are still unable to setup routing between the servers. So far I can not give any estimation on the time of service recovery. Edited by author 03.09.2015 23:19 Connectivity issue has been resolved. So currently system is operational. If you're doing a greedy solution and you're sorting by the rightmost endpoints (B_i), you need to sort with the leftmost endpoints as second key. That is, if B_i == B_j, the shortest segment of i and j goes first in the list. This basically means that longer segments are kept, so for inputs: 3 3 5 1 5 5 6 You would get result 2 1 5 5 6 instead of 2 3 5 5 6 which means you get a bigger covering of the set but the problem statement didn't mention this requirement. Edited by author 24.12.2014 21:07 there is no such information in statement program Bourne; var n,i,j,x:longint; a:array[0..150000] of smallint; b:array[0..150000] of longint; begin readln(n); for i:=1 to n do begin readln(b[i],a[i]); end; for x:=100 downto 0 do begin for i:=1 to n do if a[i]=x then writeln(b[i],' ',a[i]); end; end. :) interesting... good done! :) Re:Your code is wrong!!!!..Memory limite exid Edited by author 13.05.2006 17:02 Edited by author 13.05.2006 17:02 MLE Maybe tests were changed since april... Isnt it, Judges? Hmm... It gets MLE, really. Do they count memory on ALL tests, not on every test separately? Update: I've rewrited it, so it doesn't get MLE: #include <stdio.h> void main() { long n; unsigned char a[150000]; unsigned char hi[150000]; unsigned short lo[150000]; scanf("%ld",&n); for(long i=0;i<n;i++) { long bod; scanf("%ld%d",&bod,&a[i]); lo[i]=bod%65536; hi[i]=bod/65536; } for(int v=100;v>=0;v--) { for(int i=0;i<n;i++) if(a[i]==v) printf("%ld %d\n",hi[i]*65536+lo[i],a[i]); } } How can THIS get WA#11??? Edited by author 06.01.2006 21:12 I try so var a: array[0..100,0..150000]of longint; o,p,n,j,i : longint; begin readln(n); for i:=1 to n do begin readln(o,p); inc(a[p,0]); a[p,a[p,0]]:=o; end;
for i:= 100 downto 0 do begin for j:=1 to a[i,0] do writeln(a[i,j],' ',i); end; end. try to concate K and ID into 1 longint variable (because 10000000=3 bytes, 1 extra) using shl, shr. I've goten AC and wish you the same Edited by author 08.02.2006 17:12 Edited by author 08.02.2006 17:12 1. Replace 150000 with 150001 2. C++ solution doesn't get MLE even without hi-lo representation, simply use long. Hmm... It gets MLE, really. Do they count memory on ALL tests, not on every test separately? Update: I've rewrited it, so it doesn't get MLE: #include <stdio.h> void main() { long n; unsigned char a[150000]; unsigned char hi[150000]; unsigned short lo[150000]; scanf("%ld",&n); for(long i=0;i<n;i++) { long bod; scanf("%ld%d",&bod,&a[i]); lo[i]=bod%65536; hi[i]=bod/65536; } for(int v=100;v>=0;v--) { for(int i=0;i<n;i++) if(a[i]==v) printf("%ld %d\n",hi[i]*65536+lo[i],a[i]); } } How can THIS get WA#11??? Edited by author 06.01.2006 21:12 > 1. Replace 150000 with 150001 Thanks, it works! AC You are good! Thank you! You are genius! But my program work faster :-)) But it doesn't work :-| Задачи долго проверяются с чем это связано? И как это исправить? Никак не исправить. Виртуальные машины, на которых идет проверка перемещены между датацентрами университета, и вот уже больше суток администраторам не удается наладить связь между веб-сервером и машинами проверки. Повлиять на этот процесс, увы, возможности нет. Остается только ждать. Edited by author 04.09.2015 11:00 Сделал небольшой замер выполнения задач на C++, Java, Scala. Взял задачу задачу 1000, так-как на нее есть решения на всех языках. Результаты выполнения: C++ - 0.001, Java - 0.124, Scala - 0.577, Scala с использованием JDK классов - 0,421 Результаты неутешительны, так-как задачи с ограничением в 0.5 с не выполнимы. Воспользоваться стандартными классами JDK но выигрыш был ненамного. Да и не вижу смысла их использовать. Предполагаю что медленно стартует исполнение программ и это особенность JVM. Задачи хочу решать на Scala так-как есть такая возможность. Есть ли какие то решения данной проблемы? Don't use cin/cout or Scanner in java. Seriously? 10^5, it's so few! Only cin, only hardcore! You shoudn't use cin/cout in every problem, in which n is big enough(n > 1000, for example) Edited by author 17.12.2012 23:02 cin/cout is not TLE, as long as you do cin.sync_with_stdio(false); Yes, you may think that the number of edge can be as large as n * (n - 1) / 2, which is O(n^2), where n is the number of vertex of the graph. (10^5)^2 = 10^10. is a rather large scale data for 1 second. i ended up counting all possible Strings can be composed quickly. so preprocessing gives me 552 of the 16 symbols words 27956 of less than 16 symbols words (including those who are 1) WA1 why?can i get the test data? Edited by author 31.08.2015 18:13 can anyone please give the #4 test case? I understand the problem. There is one frying pan! Edited by author 29.08.2015 13:17 Edited by author 29.08.2015 14:14 Edited by author 29.08.2015 14:15 Can someone please tell me the problem with this code. It looks okay to me. Environment: Linux, G++ C++11, GCC version 4.9.2 #include <cmath> #include <iostream> #include <iomanip> #include <vector> #include <sstream> #include <ios> #include <string> using namespace std; int main(void) { vector<long long> v; string strBuf; long long result; while (getline(cin, strBuf)) { result = atoll(strBuf.c_str()); v.push_back(result); } vector<long long>::reverse_iterator ritr = v.rbegin(); while (ritr != v.rend()) { cout << fixed << setprecision(4) << sqrtl(*ritr) << endl; ++ritr; } return 0; } Compilation: $ g++ ktm_0_1.cpp -std=c++11 Sample execution seems fine to me: $ ./a.out 1427 0 876652098643267843 5276538 <-- After this, I enter CTRL-D manually 2297.0716 936297014.1164 0.0000 37.7757 try this one 7 1 1 2 2 4 3 5 3 7 2 9 0 5 7 answer is ccw have no idea what this test may be this test can help you: 9 4 1 2 4 3 4 6 4 5 4 7 5 8 5 9 7 BLOOD 5 answer is: 2 3 6 Good luck! My answer to this test is right,but i also get wa! why? Edited by author 18.10.2012 18:48 My answer is right but WA 5 ... I got runtime error at test 5. My algo works O(N^3) at 0.015 sec. Solution always exist. Idea: We must paint first half of edge in 'Y' and second half in 'G'. 1)Delete cycles (if the edge belongs to the cycle then we delete it from the graph) and paint edges; 2)Paint a tree. Edited by author 27.08.2015 15:36 I use bfs...but record the route in a map, and maybe the copy of the map cost too much time... How can I get all the routes in another good way? 47 times i had submitted a code with a small bug in heap... I'm sad... |
|