| Show all threads Hide all threads Show all messages Hide all messages |
| No subject | HUMOYUN_220-10 | 1000. A+B Problem | 13 Oct 2010 14:40 | 1 |
#include <stdio.h> int main() { int a, b; scanf("%d%d", &a, &b); printf("%d\n", a + b); return 0; } |
| could anyone tell me,what is test 1 ? | big_deal | 1014. Product of Digits | 13 Oct 2010 07:40 | 3 |
could anyone tell me,what is test 1 ? input "1" Edited by author 02.09.2010 08:48 |
| Error message in test 4 (solved) | Grubson | 1654. Cipher Message | 12 Oct 2010 16:29 | 2 |
error:wrong answer Do any one knows what the .... is wrong in this algorithm? i tried to decode some my messages, all worked, why it is rejected by timus or just post out some example data for tests? EDIT. Code deleted, problem solved. Edited by author 20.04.2010 16:17 Edited by author 20.04.2010 16:17 Edited by author 20.04.2010 16:17 Интересные вы люди. Когда что-то нужно, кричите о помощи, но когда получилось решить, сами даже не задумываетесь о том чтобы поделиться. Вот скажите, вам трудно было здесь написать в чем загвоздка четвертого теста? |
| AC solution | dauren.ktl | 1019. Line Painting | 12 Oct 2010 14:09 | 1 |
Can anyone send me (dauren.ktl@gmail.com) solution of that problem. I haven't any ideas to solve this problem and I am not good in data structures problems. Thanks in advance |
| how to simplize this code | BORIS (YSU) | 1209. 1, 10, 100, 1000... | 11 Oct 2010 23:28 | 2 |
Edited by author 11.10.2010 23:28 Edited by author 11.10.2010 23:28 I have already found the answer) |
| just a possible test | twinsclover | 1033. Labyrinth | 11 Oct 2010 18:42 | 1 |
5 .#### ..### ##### ##### ##... ans:108 |
| WA with cout AC with printf | jagatsastry | 1550. Dean's Pyramid 3 | 11 Oct 2010 15:25 | 6 |
This is terribly hilarious people. No precision details have been given in the question. Yet printf("%.5f",val); worked but cout<<val; didnt(WA#4). BTW the method i followed is: Find the volume of the pyramid vol(h,w)=hw*w/3 (i got it by integrating the squares at heights from 0 to h) Find the volume of the truncated cylinder using the method given in http://mathworld.wolfram.com/CylindricalSegment.htmlsubtract the second from the first. I couldnt accept this task in C++. #include<iostream> #include<math.h> using namespace std; int main() { double w,h,x,y,r,t; cin >> w >> h >> x >> y >> r; x = fabs(x); y = fabs(y); if ( y > x ) x = y; printf("%.5lf", h * w * w / 3.0 - h * 3.14159265358979 * r * r * ( w/2 - x ) / (w/2)); return 0; } take WA3, but analogical import java.io.*; import java.util.*; public class Problem1550 { /** * @param args */ public static void main(String[] args) throws IOException { Scanner in=new Scanner(System.in); //Scanner in=new Scanner(new File("input.txt")); PrintWriter out=new PrintWriter(System.out); double h,w,x,y,r; h=in.nextDouble(); w=in.nextDouble(); x=in.nextDouble(); y=in.nextDouble(); r=in.nextDouble(); x=Math.abs(x); y=Math.abs(y); if(y>x)x=y; w=h*w*w/3-(Math.PI*r*r*(h*(w/2-x)/(w/2))); out.println(Double.toString(w)); out.flush(); } } in Java - accepted. I hate this problem! there is mistake in c++ code Edited by author 09.04.2008 21:14 Here is a very fool mistake in C++ code but Java code is alright. I made this mistake in my Pascal code but then i read the problem attentively and found it. import java.io.*; import java.util.*; public class Problem1550 { /** * @param args */ public static void main(String[] args) throws IOException { Scanner in=new Scanner(System.in); //Scanner in=new Scanner(new File("input.txt")); PrintWriter out=new PrintWriter(System.out); double h,w,x,y,r; h=in.nextDouble(); w=in.nextDouble(); x=in.nextDouble(); y=in.nextDouble(); r=in.nextDouble(); x=Math.abs(x); y=Math.abs(y); if(y>x)x=y; w=h*w*w/3-(Math.PI*r*r*(h*(w/2-x)/(w/2))); out.println(Double.toString(w)); out.flush(); } } Your solution is not right. I use out.printf(Locale.US,"%.4f",(piramideVolume-cylindricalSegmentVolume)); to get AC! In Santa's code above, change cin>>w>>h to cin>>h>>w will be OK. That's really a small but serious bug. |
| WA on Test 2 | uP | 1775. Space Bowling | 11 Oct 2010 14:21 | 4 |
Can anyone help me, I got WA on test 2 and don't understand why? is the result 0.000000000 right? |
| Why Wa#3? Plz help me~~~ | William Chou | 1774. Barber of the Army of Mages | 11 Oct 2010 11:40 | 7 |
I use dinic to solve this problem. but wa#3. I think maxflow can work it out. I don't know why. could any one give me some test data. Thank you! Edited by author 10.10.2010 09:05 You are right! This is absolutely maxflow problem. But in my reprizetory I didn't find variant of algo on 300*2000 vertices graph. P.S.AC!!!! Ford_Falkerson! n=102+2000=2012 m=n+2000*n+200~200000 F<=2*n=200 complex=O((n+m)*F)~40 000 000 -normaly Edited by author 10.10.2010 14:06 My MAXN=2200; MAXM=2200000; but I still wa#3... I want to ask a question: Does this problem have Special Judge? Edited by author 10.10.2010 19:44 And this is my code(C++) [code deleted]. Edited by author 08.11.2010 15:16 My node 0 to Max is for time, and S will link to every time node(flow=k). node Max+1 to Max+N is for people, time node will link to the people node which includes this time(flow=1). then people node will link to T(flow=2). S=MAXN-1, T=Max+N+1. I use this way to find the answer: if answer is "Yes" then I will regard the vertice which flow is full as answer. Is it right? I think it can give me a feasible answer. but I can't ensure it's a minimal answer... so I wonder is there any special judge. Edited by author 10.10.2010 19:46 Edited by author 11.10.2010 11:41 now,I get AC. I have made a stupid mistake. For the input t[i] ans s[i], I think it means the i-th recruit will wait from t[i] to s[i]... but it means he will wait from t[i] to t[i]+s[i]-1... be careful~ Edited by author 08.11.2010 15:20 |
| tasks on maxflow | disa | 1421. Credit Operations | 11 Oct 2010 08:35 | 1 |
Can you give me links to another tasks solved by maxflow algorithm? On Timus or other problemset it does not matter. |
| This problem is quite funny. | 198808xc | 1507. Difficult Decision | 11 Oct 2010 00:34 | 5 |
Though I have realized there might be some math-method to solve the problem, I couldn't find them out. So, I just solve the problem "the way it tells me to do". To prevent high-precision (Chinese name of long-arithmetic), I use this method: I choose many factors and calculate the power of the matrix with the module of the factors. So, if one cell is 0 under all the factors, we can ALMOST assert that the cell is indeed 0. To prevent TLE, the factors could not be so many: I choose 10 factors first, that is 16384 (2^15), 19683 (3^9), 15625 (5^6), ... until 24389 (29^3). My program runs well but get TLE @ test 17. So, I decrease the factors to only TWO: 16384 and 19683. This time my program get WA @ 9! I think I really appreciate the author for so good test-data. After that I increase my factors to 4, adding 15625 and 16807. This time I got AC in 0.64s. Funny problem, thx to the author. Have fun and good luck. Hehe, you're CRAZY man... I just used boolean matrix. Edited by author 03.10.2010 02:10 Well, before I decided to use this CRAZY method, I have read all the topics on board, but I still can't understand the meaning of BOOLEAN MATRIX. Could you or anyone explain it to me? Input: a[i][j] = readInt() > 0; Then use && instead of * and || instead of +. If result contains at least one false value, write "No". P.S. I don't believe my eyes! You have 400+ problems solved and couldn't guess this simple approach! Edited by author 06.10.2010 22:22 Well, just after reading your post, I read the problem statement again. I found that I had ignored the fact that all the number is non-negative. (So stupid mistake) Thank you. |
| there is bug in checker | Tapyshpan Denis | 1022. Genealogical Tree | 10 Oct 2010 19:46 | 1 |
esli vyvodit' otvet otdel'no dlya kajdoj komponenty svyaznosti, to poluchaesh WA. esli sobrat' vse otvety(dlya vseh komponent svyaznosti) i srazu vyvesti, to poluchaesh AC. raznica lish' v poryadke vyvoda otvetov. |
| About Hint | SuperLight | 1776. Anniversary Firework | 10 Oct 2010 15:11 | 2 |
Can anybody explain me the hint? If we have 3 not launched rockets, why the probability of launching each is 1/3. There are 6 segments, that can be used [1,1] [2,2] [3,3] [1,2] [2,3] [1,3]. I think talk is about Markov chain on sets of disjoint segments. This graph is aciclic => DP is possible |
| Why WA #11?Can someone give me a hint? | Luminer | 1778. Chinese Hockey 2 | 10 Oct 2010 09:50 | 1 |
Why WA #11?Can someone give me a hint? |
| float,or double? | Seter | 1043. Cover an Arc | 10 Oct 2010 09:09 | 1 |
(I'm an English BEGINNER...) First I used double and got WA on #9 Then I changed double to float and got WA on #42 At last I used double,and checked if it's #9(I've found the data of #9),and got AC... I was confused... |
| connected or not? | hoan | 1040. Airline Company | 10 Oct 2010 00:22 | 1 |
i got AC but my code is correct when is graph is connect, who can solve this when the graph is arbitary? plz give me your code. (sorry for bad english) :D |
| 2 Admins: weak tests | DK [Samara SAU] | 1378. Artificial Intelligence | 9 Oct 2010 22:22 | 1 |
I've made a mistake in input W and H order, but get Accepted... |
| Подстроки вида xyxyx | Куплю мопед! | 1782. Jack's New Word | 9 Oct 2010 18:38 | 2 |
Могли ли подстроки вида xyxyx (из условия задачи) встречаться в промежуточных словах, написанных Джеком до финального? В таком случае плохая подстрока будет и в финальной строке |
| Wrong answer 47 | Kornilov Peter | 1782. Jack's New Word | 9 Oct 2010 16:51 | 1 |
Do you have any ideas why? |
| WA#10 | MTS | 1783. Nuclear Arms Race | 9 Oct 2010 16:48 | 1 |
WA#10 MTS 9 Oct 2010 16:48 |