| Показать все ветки Спрятать все ветки Показать все сообщения Спрятать все сообщения |
| WA Test 6 | AC_Girl | 1654. Шифровка | 24 авг 2012 09:07 | 1 |
who can tell me,what's the sixth datas. why always WA in test 6 |
| wa #9 | garra | 1068. Сумма | 24 авг 2012 00:50 | 3 |
wa #9 garra 26 янв 2012 08:48 Post your code, nobody will actually tell you the exact tests. It`s something connected with outputting float-type like (123e+21). Just Int that. :) |
| what is the problem? | Ahmet Faruk Ozkan | 1005. Куча камней | 23 авг 2012 20:10 | 1 |
# include <stdio.h> # include <conio.h> # include <math.h> # include <stdlib.h> # include <time.h> # include <limits.h> bubble( int a[] , int n ) { int i , j , t;
for( i = n - 1 ; i >= 1 ; i-- ) for( j = 1 ; j <= i ; j++ ) if( a[j - 1] > a[j] ){ t = a[j - 1]; a[j - 1] = a[j]; a[j] = t; } } int bul_( int *dizi , int optimum , int adet ) { static int min = INT_MAX; int i; min = min < optimum ? min : optimum ; if( dizi[0] > optimum ) return; if( adet == 0 && dizi[0] < optimum ) min = min < optimum - dizi[0] ? min : optimum - dizi[0] ; for( i = 0 ; i < adet ; ++i ) bul_( dizi + i + 1 , optimum - dizi[0] , adet - i - 1 );
return min; } int main() { int dizi[100] , adet , i , optimum , toplam = 0 , deger; scanf("%i",&adet); for( i = 0 ; i < adet ; ++i ){ scanf("%i",&dizi[i]); toplam += dizi[i]; } bubble( dizi , adet ); optimum = toplam / 2; deger = bul_( dizi , optimum , adet ); printf("%i",toplam % 2 == 0 ? deger * 2 : 2 * deger + 1 ); system("pause"); return 0; }
this code solve only four test case
|
| Hints - Access Violation | SquidBoy | 1001. Обратный корень | 23 авг 2012 17:51 | 2 |
1) Read the problem properly (I misread 256 KB to be 256 Bytes) 2) 256KB = 256 * 1024 Bytes 3) How many numbers can be used in 256KB of data (and how much space is used storing them) mean 256*1024 = total bytes. (total bytes)/8byt . as for 18 dijit no in c double is used which is of 8 byte so it is 32768 = size of aray (double) |
| Test 51 | IgorKoval(from Pskov) | 1717. Правила допуска | 23 авг 2012 03:59 | 1 |
Test 51 IgorKoval(from Pskov) 23 авг 2012 03:59 Try this: 2 1 1 1 1 1 1 Answer: 1 1 1 1 Good luck! |
| what is test number 11 | Akshay | 1083. Факториалы!!! | 22 авг 2012 23:38 | 1 |
|
| What no discuss :)) | xurshid_n | 1733. Забытые технологии | 22 авг 2012 12:11 | 1 |
my be it's no hard problem. Why few men solved? After lot of submit AC!! It's no hard, but tricky problem for me:)) I didn't use epsilon!!! Edited by author 22.08.2012 19:49 |
| Can anyone give me #7 please, I've got Exhausted by this test!!!!!!!!!!!! | zz | 1496. Спамер | 22 авг 2012 09:45 | 1 |
|
| WA 10 | Anton [SUrSU] | 1701. Остап и партнёры | 21 авг 2012 18:44 | 2 |
WA 10 Anton [SUrSU] 11 апр 2009 01:15 Please, give some useful tests. Input: 5 1 1 2 1 Output: Possible 0 1 0 0 0 |
| Самая непонятная задача!!!!! | xurshid_n | 1509. Распознавание домино | 21 авг 2012 15:51 | 1 |
В условии написано, что домино перевёрнута. Но я отыслал перевёрнутая версия - ошибка, а не перевёрнутая версия принита, что за задача? Edited by author 21.08.2012 15:51 Edited by author 21.08.2012 16:22 |
| If you have WA @ 10 | 198808xc | 1879. GOV-стажировка 2 | 21 авг 2012 13:53 | 2 |
Pay attention that you should use LONGINT to avoid arithmetic overflow. |
| What is the test#2? | Nikol@ | 1826. Минное поле | 20 авг 2012 20:41 | 6 |
maybe something like : 5 1 2 3 4 5 )))) i think that answer will be 16 ) i got 16, but it's again wa#2 ( I think you are wrong. My AC program prints 16 too Edited by author 06.07.2011 11:00 |
| what does those test means and how they help us to find problem in code ? | Muhammad Ayub khan | | 20 авг 2012 17:09 | 1 |
plz some body explain with details plz. Edited by author 20.08.2012 17:09 Edited by author 20.08.2012 17:09 |
| Why WA5? | Michael Hranik(VNTU) | 1025. Демократия в опасности | 19 авг 2012 23:19 | 3 |
Why WA5? Michael Hranik(VNTU) 4 окт 2009 18:29 #include <iostream> using namespace std; int main() { int a[101]; int k; cin>>k; for (int i=0; i<k; i++) { cin>>a[i]; } for (int i=0; i<k; i++) { int q=i; int min=a[i]; for (int j=i+1; j<k; j++ ) if (a[j]<a[i]) { q=j; min=a[j]; } if (q!=i) { int tmp=a[i]; a[i]=a[q]; a[q]=tmp; } } long long s=0; for (int i=0; i<=(k/2); i++) s=s+((a[i]/2)+1); cout<<s<<endl; return 0; } Excuse me please, but I've already got AC. So I don't need your answers. |
| what is test no 2 | Muhammad Ayub khan | 1083. Факториалы!!! | 19 авг 2012 21:43 | 1 |
plz explain what this test no shows ? |
| Why crash on test #2?! (invalid floating-point operation) | Jumbo | 1020. Ниточка | 19 авг 2012 20:05 | 2 |
type t=record x:real; y:real; end; function arccos(a:real):real; var t:real; Begin if a=1 then arccos:=0 else if a=-1 then arccos:=180 else begin t:=a/sqrt(1-sqr(a)); arccos:=180*((pi/2)-arcTan(t))/pi; end; end; function dlina(x1,y1,x2,y2:real): real; begin dlina:=sqrt( (x1-x2)*(x1-x2) + (y1-y2)*(y1-y2) ); end; function cos_(x1,y1,x2,y2,x3,y3:real):real; begin cos_:=( dlina(x3,y3,x2,y2)*dlina(x3,y3,x2,y2) + dlina(x1,y1,x2,y2)*dlina(x1,y1,x2,y2) - dlina(x1,y1,x3,y3)*dlina(x1,y1,x3,y3) ) / 2*dlina(x1,y1,x2,y2)*dlina(x3,y3,x2,y2); end; var n,i:integer; x,y,p,cos,r:real; mas:array[1..102] of t; Begin readln(n,r); p:=0; for i:=1 to n do begin readln(mas[i].x,mas[i].y); if i>1 then p:=p+dlina(mas[i-1].x,mas[i-1].y,mas[i].x,mas[i].y); end; p:=p+dlina(mas[1].x,mas[1].y,mas[n].x,mas[n].y); mas[n+1]:=mas[1]; mas[n+2]:=mas[2]; for i:=1 to n do begin cos:=-cos_(mas[i].x,mas[i].y,mas[i+1].x,mas[i+1].y,mas[i+2].x,mas[i+2].y); p:=p+arccos(cos)*2*pi*r/360; end; writeln(p:1:2); end. Edited by author 21.03.2011 01:38 maybe you divide by zero. |
| WA 5 | Илья Зиновьев | 1727. Магические числа Знайки | 19 авг 2012 16:34 | 2 |
WA 5 Илья Зиновьев 16 ноя 2009 21:32 Re: WA 5 Vladimir Plyashkun [CSU] 19 авг 2012 16:34 |
| What the hell in the test 12 ?! | tclsm | 1839. Ментакулус | 19 авг 2012 13:00 | 2 |
|
| WA #2 | Rouk | 1304. Параллелепипед | 19 авг 2012 04:20 | 2 |
WA #2 Rouk 19 авг 2012 00:07 |
| No subject9 | Dimon | 1068. Сумма | 18 авг 2012 19:28 | 1 |
Edited by author 18.08.2012 19:36 |