| Show all threads Hide all threads Show all messages Hide all messages |
| AC in 0.031s (233 КБ) on c++ | Rafikov Ramil | 1222. Chernobyl’ Eagles | 20 Oct 2009 23:15 | 1 |
|
| TLE #13 or WA #12 | icanwin | 1046. Geometrical Dreams | 20 Oct 2009 18:16 | 2 |
This problem can be solved only by numerical methods, or it is possible to solve analytically? Stupid handmade iterative methods do not work. Really it is necessary to use a method of the quickest descent, or a method of Hook and Jeeves?? Very much I doubt... done icanwin 20 Oct 2009 18:16 I have received AC without numerical methods. |
| why wa on test12? | Tuz | 1728. Curse on Team.GOV | 20 Oct 2009 01:52 | 2 |
Can you tell me some tips on test12? thanks. try to check you read function (Efremov EfremovA) |
| Wrong answer Test 9 ( C ) | EvGeniy[ONPU] | 1001. Reverse Root | 19 Oct 2009 22:29 | 2 |
#include <stdio.h> #include <math.h> int main(void){ long float arr[65536]; int i = 0; do { if (scanf("%lf",&arr[i])==EOF) break; i++; }while(i<65536); for( --i; i >= 0; i--) printf("%.4lf\n",sqrt(arr[i])); return 0 ; } zero blank zero blank... it is one figure per two bytes thereby 256*2^10 / 2 = 131072 131072 >> 0x10000 |
| WA6 | FlashKa | 1727. Znaika's Magic Numbers | 19 Oct 2009 22:14 | 2 |
WA6 FlashKa 17 Oct 2009 17:49 Do you walking around numbers in increasing order? If this, it's wrong. I got WA#6. |
| Why my program get WA?I can't find the mistake. | Sarby Liang | 1138. Integer Percentage | 19 Oct 2009 09:31 | 4 |
program ural1138; var i,ans,n,s:integer; f:array[1..10000] of integer; procedure dp; var i,j:integer; begin f[s]:=1; for i:=s to n-1 do for j:=1 to 100 do if ((i*j) mod 100=0)and(i+(i*j) div 100<=n) then if f[i]+1>f[i+(i*j) div 100] then f[i+(i*j) div 100]:=f[i]+1 end; begin readln(n,s); dp; ans:=0; for i:=n downto s do if f[i]>ans then ans:=f[i]; writeln(ans) end. add these: "if f[i]>0 then......" Thanks. I make a mistake here,too. many thanks, mistake here too |
| Why WA#2??? | Baranova_ED(YSPU) | 1680. The First Nonqualifying | 19 Oct 2009 04:29 | 5 |
Help me!! Please Edited by author 01.04.2009 01:22 Help me please!!! Edited by author 23.09.2009 02:03 Hi, Make sure you split the input string about # and then convert the university name into lowercase (or uppercase) fully because two names with the same spelling are considered to be the same. Lebron and LeBron are the same ! I just kept adding the university names into a HashSet unless its size became q + 1. and what it was ???? I convert the register of words #include <iostream> #include <stdio.h> using namespace std; struct team{ char name[35]; char name2[35]; int number; int place; }; team x[201]; int n; int fcmp(const void *p1,const void *p2){ for (int i=0;i<35;i++){ if ((*(team*)p1).name2[i]>(*(team*)p2).name2[i])return 1; if ((*(team*)p2).name2[i]>(*(team*)p1).name2[i])return -1; } return 0; } int fcmp1(const void *p1,const void *p2){ return (*(team*)p1).place-(*(team*)p2).place; } void kill(){ int j=-1; for (int i=0;i<(n);i++){ if (fcmp(&x[i],&x[i+1])){ x[++j]=x[i]; } } n=j+1; } void upper(char &a){ if ((a>=65)&&(a<=91)) a+=32; } int main(int argc, char* argv[]) { int y,q; cin>>y>>n>>q; char c; c=getchar(); for (int i=0;i<n;i++){ int h=0; char temp=1; x[i].number=1; x[i].place=i; temp=getchar(); while (temp!=10){ if (temp!='#'){ x[i].name[h++]=temp; upper(temp); x[i].name2[h-1]=temp; } else{ x[i].name[h++]='#'; x[i].name2[h-1]='#'; cin>>x[i].number; temp=10; c=getchar(); continue; } temp=getchar(); } x[i].name[h++]=0; x[i].name2[h-1]=0; } qsort(x,n,sizeof(team),fcmp); kill(); qsort(x,n,sizeof(team),fcmp1); cout<<x[q].name; if (x[q].name[strlen(x[q].name)-1]=='#') cout<<x[q].number; return 0; } |
| TLE #4 | icanwin | 1046. Geometrical Dreams | 19 Oct 2009 03:54 | 3 |
TLE #4 icanwin 19 Oct 2009 03:00 http://paste.pocoo.org/show/145742/After each iteration I calculate a point, as average for two points received by different ways (a "counter-clockwise" way and a "clockwise" way, on half of quantity of points of a polygon everyone) Edited by author 19.10.2009 04:00 TLE #4 icanwin 19 Oct 2009 03:22 But amount of points are less than 10. It causes fears. Is it weak convergence? Edited by author 19.10.2009 04:03 In what way I can choose a good point for initial approach of a starting point? |
| why wa2?...so many people wa2...is there any hints? | namiheike | 1078. Segments | 18 Oct 2009 23:57 | 2 |
why wa2?...so many people wa2...is there any hints?plsease. I have WA2 too... I can't understand the reason of it! Can somebody help me? |
| What's wrong, the judge throws me wrong answer | María Fernanda Borge | 1001. Reverse Root | 18 Oct 2009 20:01 | 3 |
program reverseroot; const max=10000000; type tipovec=array[1..max] of double; var i:int64; n:double; vec:tipovec; j:longint; begin i:=1; while not(eof) do begin read(n); vec[i]:=sqrt(n); inc(i); end; for j:=i-1 downto 1 do begin writeln(vec[j]:0:4); end; end. Edited by author 18.10.2009 13:59 i think you should check for EOF after a read attempt, not before it |
| Are these human strands? | Atanas | 1724. Origin of Man Clarified | 18 Oct 2009 18:34 | 2 |
I was just wondering- are "ACac" and "ACCcca" human strands? ACac -- is not; ACCcca -- is; |
| Very, very easy problem... | Elisabeth | 1641. Duties | 18 Oct 2009 18:13 | 1 |
My AC: 0.015 121KB Try greedy ! |
| I've used an obviously wrong algo and received WA6 | Sevenk | 1679. Scrooge's Tower | 18 Oct 2009 15:58 | 1 |
Edited by author 18.10.2009 15:59 |
| An advice for crashers | Sergey Naumenko | 1102. Strange Dialog | 18 Oct 2009 15:52 | 4 |
Using of dynamic memory allocation for the long string char * s = new char [10000000]; //.. delete [] s; allowed me to avoid the crash problem. Suppose it would be helpful for someone. A better idea is to declear the array outside any functions. #include ... char s[1000000000000000000]; int main(){} If you do so, it won't take up xxxxGB RAM. Instead, it depends on which part of the array you used. For example, you only use 1-10000 of the array, it will use 10KB mem. And that's cool. |
| wa14 | Alexandr_Opara[SumySU] | 1728. Curse on Team.GOV | 18 Oct 2009 01:05 | 1 |
wa14 Alexandr_Opara[SumySU] 18 Oct 2009 01:05 who know what can it be?? |
| WA 9 | Hanzbrow (TNU) KCC | 1726. Visits | 17 Oct 2009 21:24 | 1 |
WA 9 Hanzbrow (TNU) KCC 17 Oct 2009 21:24 you need __int64 Edited by author 17.10.2009 21:32 |
| For the input "tebidohtebidoh", is substring "t" to be a right output? | JohnsonGuo | 1723. Sandro's Book | 17 Oct 2009 19:29 | 2 |
substring "t" encounters in the input string twice, as many as "tebidoh" encounters. Yes ! =) So you can calculate amount of every letter and then print answer o(string length) Edited by author 17.10.2009 19:30 |
| WA#7 (-) | Grigor Gevorgian | 1036. Lucky Tickets | 17 Oct 2009 19:17 | 5 |
WA#7 (-) Grigor Gevorgian 9 Jan 2009 21:59 I use java BigInteger and get WA#7 I use formula f(n,k)=f(n-1,k)+f(n-1,k-1)+...+f(n-1,k-9) if you see it is wrong,please help Edited by author 25.01.2009 13:43 I use the same formula as you. and I get WA#7 too. Do you realize that the number of such tickets can be of the order of 10^N, that is an N-digit number, where N~50 of decimal digits? Edited by author 18.01.2009 03:51 Edited by author 18.01.2009 03:53 The formula is correct,just made a stupid bug: I wrote a[j][i]=a[j][i].add(a[j][l]) instead of a[j][i]=a[j][i].add(a[j][i-l]) :) Edited by author 25.01.2009 13:42 Edited by author 25.01.2009 13:42 I guess that the test 7 contains 50 900. The test 8 contains 50 450. |
| входные данные | MOPDOBOPOT | 1313. Some Words about Sport | 17 Oct 2009 18:34 | 3 |
Как их считать? пробую for i:=1 to n do begin for i:=1 to о do read(a[i,j]); readln; end; - зацикливается, пробую: for i:=1 to n do begin for i:=1 to о do read(a[i,j]); writeln; end; - не проходит 1 тест (из-за лишних переводов строки в исходных данных) =(( for i:=1 to n do for j:=1 to n do read(a[i,j]); двумерным массивом считываешь for i:=1 to n do begin for i:=1 to о do read(a[i,j]); writeln; 2 раза счётчик i используешь во вложенном цикле for i:=1 to n do begin for J:=1 to о do read(a[i,j]); writeln; |
| Why WA on test number 1??? | SOGU | 1728. Curse on Team.GOV | 17 Oct 2009 17:48 | 2 |
Please ask anybody? why can be wrong answer on the first test? |