| Показать все ветки Спрятать все ветки Показать все сообщения Спрятать все сообщения |
| Weak time limit | Fyodor Menshikov | 1375. Нонконформизм | 22 фев 2010 13:38 | 2 |
Upgrade of Timus test server happened on autumn 2008. I became several times faster, but very few time limits were changed. This problem is one that needs time limit to be lowered. Because with 1s TL and new servers some brute force solutions get AC - solutions that would never get AC on old testing server. I suggest TL=0.2s considering that some languages (Java and C#) need about 0.1s to start program. I became several times faster,... OMG :) I think, that good brute-force solution on С++ avoid TLE and after lowering TL (some authors write about it at forum ). So i think, that your suggest will be rejected. Edited by author 22.02.2010 13:46 |
| Probabilistic approach | unlucky [Vologda SPU] | 1095. Никифор 3 | 22 фев 2010 01:25 | 3 |
I solved this problem by probabilistic approach and brute-force. No TLE, just stupid WA :) Hahaha. It's guro method! |
| WA #2 | Sourse | 1587. Летающая свинья | 21 фев 2010 23:27 | 2 |
WA #2 Sourse 1 май 2009 17:08 need help me please.... Edited by author 01.05.2009 17:09 Edited by author 01.05.2009 17:09 |
| why is that? anyone please help | null | 1712. Шифровальная решётка | 21 фев 2010 16:11 | 1 |
ofcourse i've tried it on my computer it runs that program just fine i've tried submitting my solution 3 times. why is it giving me CE and WA can anyone explain it? |
| WA#6 | jagatsastry | 1084. Пусти козла в огород | 20 фев 2010 23:25 | 3 |
WA#6 jagatsastry 28 ноя 2007 21:38 Is there anyone who's got AC after getting WA#6 and then rectifying his code. Any tricky test case. Edited by author 28.11.2007 21:39 the test where all square is available... for example 9 8 correct is 81 but my answer was 70.93292183 Re: WA#6 Vovan [SL-StekoL] 20 фев 2010 23:25 |
| What's wrong here? | Xysia | 1502. Точки домино | 20 фев 2010 20:12 | 2 |
All codes listed below works good on my computer (and they give correct answers), but when submitting I get: Code #1: --------------------------------------------------------- #include<stdio.h> #include<iostream.h> int main() { long long n; cin>>n; long long wynik; wynik=(n*(n+1)*(n+2))/2; cout<<wynik<<endl; return 0; } ---------------------------------------------------------- Compilation error Code #2: removed iostream.h and replaced cin and cout with scanf("%lld",%n); and printf("%lld\n",wynik); WA on test 5 Code #3: same as #2, but with printf("%0.lf\n, (double)wynik); instead WA on test 1 ----------------------------------------------------------- All those programs work and give correct results on my computer. What's wrong here? Please help. For The First Code : Add using namespace std; for using cin & cout. |
| Wonder what's the solutions which runs in 0.1 second? | Gandalf | 1669. Универсальное слово | 20 фев 2010 18:29 | 1 |
|
| wa#12 | Crash_access_violation | 1244. Джентльмены | 20 фев 2010 16:57 | 7 |
wa#12 Crash_access_violation 15 мар 2009 14:09 I solve this task with DP, but wa#12... Please give me some useful tests. Thanks. wa#12 Crash_access_violation 15 мар 2009 14:12 to Admins!!! 2 2 1 1 result empty line or zero? Re: wa#12 [LG]_#\#@P$T[101]R 30 апр 2009 14:46 Also have WA #12 (now). The test above is incorrect (weight of not full set is strongly less than weight of full set of cards by condition) I lost this fragment: if(f[i][1-page]==-1) f[i][page]=-1; or if(f[i][j-1]==-1) f[i][j]=-1; Re: wa#12 [LG]_#\#@P$T[101]R 4 июл 2009 01:06 Please give me (show me) test#12. Thanks Edited by author 04.07.2009 01:20 |
| Got AC | zam_sabina | 1319. Отель | 19 фев 2010 23:41 | 1 |
Got AC zam_sabina 19 фев 2010 23:41 Just use The Wave algorithm.. |
| Solution for (0<A+B<10^2^64-1) | VladimirZagorodskih | 1000. A+B Problem | 19 фев 2010 20:04 | 4 |
program Project1; {$APPTYPE CONSOLE} var sym : char; a, b : AnsiString; la, lb, i : qword; l, m, n : byte; c : array of byte; begin read(sym); repeat a:=a+sym; read(sym); until (sym=' '); readln(b); la:=length(a); lb:=length(b); if la>lb then setlength(c, la) else setlength(c, lb); i:=0; n:=0; repeat i:=i+1; if la>0 then l:=ord(a[la])-48 else l:=0; if lb>0 then m:=ord(b[lb])-48 else m:=0; c[i]:=l+m+n; n:=c[i] div 10; c[i]:=c[i] mod 10; if la>0 then la:=la-1; if lb>0 then lb:=lb-1; until (la<=0) and (lb<=0) and (n=0); while (i>0) do begin write(c[i]); i:=i-1; end; end. =) (= just high precision, but a bit slow Or just use unsigned long long in C... I know that this problem can be solved by this: program Project1; {$APPTYPE CONSOLE} uses SysUtils; var a, b : longint; begin read(a,b); write(a+b); end. I did it just for fun)))) |
| De ce nu merge ba imbecililor ca ma enervati, ce dracu? | Darth Niculus | 1225. Флаги | 19 фев 2010 17:03 | 3 |
ce ai? nu merge submit`u? |
| Wrong statement | MSDN | 1016. Кубик на прогулке | 19 фев 2010 14:31 | 2 |
Strange... Solving this problem I thought that rows are numbered from bottom to top. |
| No subject | IrogKoval(from Pskov) | 1352. Простые числа Мерсенна | 18 фев 2010 20:13 | 1 |
No subject IrogKoval(from Pskov) 18 фев 2010 20:13 Edited by author 18.02.2010 20:17 |
| MLE | KALO | 1160. Network | 18 фев 2010 15:07 | 1 |
MLE KALO 18 фев 2010 15:07 Why I got MLE#3? I'm using 1 int[M][3] matrix to store the edges, 3 short[N+1] arrays for Union-find, and an additional short[N] to store the resulting spanning tree. Bug in qsort. Edited by author 18.02.2010 15:19 |
| (*)should be thought as 'YES'! | bottles | 1027. Снова D++ | 16 фев 2010 21:08 | 6 |
why it is wrong? "An arithmetic expression in D++ is always opened by "(", is closed by ")" and may contain any of the following symbols: "=+-*/0123456789)("" arithmetic expression is opened by '(',may contain '*'and closed by ')'.so "(*)" can seen as a right arithmetic expression. anyone can answer me?? my AC'ed solution says that (*) is NOT a legal expression. Either the test set does not have such things, or judges do not consider (*) to be an arithmetic expr An arithmetic expression can't start with a pair of symbols "(*" In my opinion, (*) is valid COMMENTARY - it's opened by (* and closed by *) ; I think we need to add "and these two pairs of symbols should not intersect" to this phrase in statement - " A comment is always opened by a pair of symbols "(*" and is closed by a pair of symbols "*)" , otherwise (*) is YES for sure. Edited by author 16.02.2010 13:52 In my opinion, (*) is valid COMMENTARY - it's opened by (* and closed by *) ; I think we need to add "and these two pairs of symbols should not intersect" to this phrase in statement - " A comment is always opened by a pair of symbols "(*" and is closed by a pair of symbols "*)" , otherwise (*) is YES for sure. You is very crazy man :) I think, that you never write syntax analyzer for languages. You "additional condition" is obvious for all, that ever write syntax analyzers, but not for you. :) This problem is about syntax analyzer , NOT working with any string and substrings. Edited by author 16.02.2010 21:12 |
| problem in 1001 in java | Nasimi | 1001. Обратный корень | 16 фев 2010 21:04 | 2 |
Dear Team, It is really very good support by you. But please, look at the problem 1001-in java. There might be problem in compiler-there is no one who solved this question in java. I will include my answer too.: import java.util.Scanner; public class second{ public static void main(String[] args) { Scanner s = new Scanner(System.in); double[] arr2=new double[200000]; int i=0,k=0; do{ arr2[k]=s.nextDouble(); k++; } while(s.hasNext()); for(i=k;i>0;i--){ System.out.printf("%.4f\n",Math.sqrt(arr2[i-1])); } } } Are you kidding :) Many people solved this problem in Java. I am among them. Edited by author 16.02.2010 21:05 |
| Some tests | unlucky [Vologda SPU] | 1474. Про лягушек | 16 фев 2010 18:26 | 1 |
Some tests unlucky [Vologda SPU] 16 фев 2010 18:26 My solution use emulation with some heuristic conditions (for avoiding deadlock). Solution is o(n). Some test: 1 output 3 0 2 1 -------- 2 output 8 1 3 4 2 0 1 3 2 -------- 3 output 15 2 4 5 3 1 0 2 4 6 5 3 1 2 4 3 -------- 4 output 24 3 5 6 4 2 1 3 5 7 8 6 4 2 0 1 3 5 7 6 4 2 3 5 4 -------- 5 output 35 4 6 7 5 3 2 4 6 8 9 7 5 3 1 0 2 4 6 8 10 9 7 5 3 1 2 4 6 8 7 5 3 4 6 5 |
| Must the answer be minimal? | yuyan | 1474. Про лягушек | 16 фев 2010 17:39 | 2 |
"If there are many solutions, you may output any of them." |
| problems with qsort | gt11 | 1207. Медиана на плоскости | 16 фев 2010 15:25 | 4 |
#include <iostream> using namespace std; #include <math.h> struct Point { long double x; long double y; }; struct Point2 { int number; long double angle; }; void insertSort(Point2 ** a, long size) { Point2 * x; long i, j; for ( i=0; i < size; i++) { // цикл проходов, i - номер прохода x = a[i];
// поиск места элемента в готовой последовательности for ( j=i-1; j>=0 && (a[j]->angle < x->angle); j--) a[j+1] = a[j]; // сдвигаем элемент направо, пока не дошли // место найдено, вставить элемент a[j+1] = x; } } /* int compare( const void *arg1, const void *arg2 ) { if(((Point2*)arg1)->angle>((Point2*)arg2)->angle) return -1; else return 1;
}*/ int main() {
int n; cin>>n; Point * arr = new Point[n]; long double min_a=0; int min_ai; for(int i = 0;i<n;++i) { cin>>arr[i].x; cin>>arr[i].y; if((!i)||arr[i].y<min_a) { min_a = arr[i].y; min_ai = i; } } cout<<min_ai+1<<" "; Point2 ** arr2 = new Point2*[n-1]; int j = 0; long double xx = arr[min_ai].x; long double yy = arr[min_ai].y; for(int i = 0;i<n;++i) { if(i!=min_ai) { arr2[j] = new Point2; arr2[j]->number = i; arr2[j]->angle = (arr[i].x - xx)/sqrt(pow(arr[i].x-xx,2)+pow(arr[i].y-yy,2)); ++j; } } //qsort(arr2,n-1,4,compare); insertSort(arr2,n-1); cout<<arr2[(n-1)/2]->number+1<<endl; return 0; } I don't know why, but qsort sorts them wrongly (I commented part that is qsort and changed it with simple O(n^2) sorting and got AC... But could tell me, what's so wrong with this qsort? I think I could get a better time with it. In this task qSort works very quick :) But you time is not very bad ;) If you will use sort from <algortihm>, you will get AC. http://www.cplusplus.com/reference/clibrary/cstdlib/qsort/I changed int compare( const void *arg1, const void *arg2 ) { if(((Point2*)arg1)->angle>((Point2*)arg2)->angle) return -1; else return 1; to int compare( const void *arg1, const void *arg2 ) { if(((Point2*)arg1)->angle>((Point2*)arg2)->angle) return 1; else return -1; according to conditions presented in the href above. On my computer I get answer "1 4" on first test, but on server in gets WA #1. /* qsort example */ #include <stdio.h> #include <stdlib.h> int values[] = { 40, 10, 100, 90, 20, 25 }; int compare (const void * a, const void * b) { return ( *(int*)a - *(int*)b ); } int main () { int n; qsort (values, 6, sizeof(int), compare); for (n=0; n<6; n++) printf ("%d ",values[n]); return 0; } It is very very strange. QSort does not work here. Use Merge or Heap sort. |
| How can I contact the Team? | nat_cu_th | | 16 фев 2010 12:18 | 3 |
The only email I found on this is site is timus_support@acm.timus.ru, which when I send an email to, I got mail return: The original message was received at Sun, 24 Jan 2010 15:38:57 +0500 from mail-pw0-f57.google.com [209.85.160.57] ----- The following addresses had permanent fatal errors ----- judge_mailbox@busin.usu.ru (reason: 550 5.1.1 User unknown) (expanded from: <timus_support@acm.timus.ru>) ----- Transcript of session follows ----- 550 5.1.1 judge_mailbox@busin.usu.ru... User unknown Final-Recipient: RFC822; timus_support@acm.timus.ru X-Actual-Recipient: RFC822; judge_mailbox@acm.busin.usu.ru Action: failed Status: 5.1.1 Diagnostic-Code: X-Unix; 550 5.1.1 User unknown Last-Attempt-Date: Sun, 24 Jan 2010 15:39:05 +0500 ---------- Forwarded Message ---------- From: Nat Pavasant <n...@gmail.com> To: timus_support <timus_support@acm.timus.ru> Date: Sun, 24 Jan 2010 17:38:44 +0700 Subject: ... Try email judge_school (at) mail.ru |