## Search found 6 matches

Sun Oct 03, 2004 5:28 am
Forum: Volume 104 (10400-10499)
Topic: 10419 - Sum-up the Primes
Replies: 51
Views: 16541

### Accepted finally!

alu_mathics:
Your last I/O is correct, and the last I/O let me find the last mistake in my program! After almost two weeks work, this problem is solved finally.
Thank to all that post reply to this topic!
Sun Sep 26, 2004 3:27 pm
Forum: Volume 104 (10400-10499)
Topic: 10419 - Sum-up the Primes
Replies: 51
Views: 16541

### 10419:Help!What's wrong?

This my code. plz tell me what's wrong, or tell me the the lexicographically smallest expression really mean! thanks!!! [cpp] #include <iostream.h> #include <fstream.h> #include <string.h> #include <stdio.h> #ifdef ONLINE_JUDGE istream &fin=cin; #else ifstream fin("10419.in"); #endif struct Sum//The...
Sun Sep 26, 2004 2:53 pm
Forum: Volume 104 (10400-10499)
Topic: 10419 - Sum-up the Primes
Replies: 51
Views: 16541

### I'm really confused with your I/O

Your output is really make me confused.
CASE 1:
11+11+113+113+13+13+17+17+19+19

101+101+103+11+3+3+5+5+7+7

I think my answer is smaller than you.
Can you explain it?
Fri Sep 24, 2004 8:28 pm
Forum: Volume 104 (10400-10499)
Topic: 10419 - Sum-up the Primes
Replies: 51
Views: 16541

### Help

alu_mathics:
Can you tell me what's wrong you have made? I had test all data above, they are all ok, but I still got W.A. Maybe I have made the same mistake with you.
Sat Aug 28, 2004 12:43 am
Forum: Volume 105 (10500-10599)
Topic: 10583 - Ubiquitous Religions
Replies: 33
Views: 14538

### My algo

My algo is: read pair(x,y) 1.if neither of x and y is labeled person+2;(person is the number of person that I have visited) group++;(group is the number of groups) label x and y with group; 2.if one of them is labeled and another isn't person++; make them label the same 3.if both of them are labeled...
Fri Aug 27, 2004 4:18 pm
Forum: Volume 105 (10500-10599)
Topic: 10583 - Ubiquitous Religions
Replies: 33
Views: 14538

### 10583 WA, help!

My Code: [cpp] #include <iostream.h> #include <fstream.h> #ifdef ONLINE_JUDGE istream &fin=cin; #else ifstream fin("10583.in"); #endif void Judge(long int rel[2],long int group[50001],long int rels[50001][2],long int *p,long int *g,long int *r) { if (group[rel[0]]==0&&group[rel[1]]==0) { (*p)+=2; (*...