## Search found 6 matches

Tue Jul 29, 2003 5:42 am
Forum: Volume 105 (10500-10599)
Topic: 10510 - Cactus
Replies: 31
Views: 22896
Alexander Kozlov wrote:Try this input:

1
4
8
0 1
1 2
2 3
3 0
2 4
4 2
3 4
4 3

This is not cactus, but for every node in-degree equals to out-degree.
Am I right?
is that we can slove in biconnective algorithm?
biconnective can be to find the SCC and back/forward/tree edges
Sun May 26, 2002 4:35 pm
Forum: Volume 1 (100-199)
Topic: 160 - Factors and Factorials
Replies: 205
Views: 25668
You can compare me code My code can do the right way [c] #include<stdio.h> int main(void) { int input=0; while(1==scanf("%d", &input)) { if(0==input) return 0; else { int array[25][2]= {{2,0},{3,0},{5,0},{7,0},{11,0} ,{13,0},{17,0},{19,0},{23,0},{29,0} ,{31,0},{37,0},{41,0},{43,0},{47,0} ,{53,0},{59...
Fri May 24, 2002 3:35 pm
Forum: Volume 1 (100-199)
Topic: 116 - Unidirectional TSP
Replies: 226
Views: 37161

### help in Problem 116

The WA problem confused me at all!!! :evil: The sample input which my program can do in right way, but the judge gave me WA...... there is the code [c] #include<stdio.h> void WriteSumAndPath(long array[], long *upper, long *middle, long *down) { long smallest=*middle, path=*(middle+1); long uppersum...
Fri May 24, 2002 11:32 am
Forum: Volume 3 (300-399)
Topic: 374 - Big Mod
Replies: 79
Views: 12231
I got it!!!
Thu May 23, 2002 4:03 am
Forum: Volume 3 (300-399)
Topic: 374 - Big Mod
Replies: 79
Views: 12231
sorry

it is WA
Wed May 22, 2002 6:52 pm
Forum: Volume 3 (300-399)
Topic: 374 - Big Mod
Replies: 79
Views: 12231

### 374 - I can't find the wrong

[c] #include<stdio.h> int main(void) { /* R = B^P mod M */ unsigned long B=0, P=0; unsigned int M=0; while(3==scanf("%d %d %d", &B, &P, &M)) { int mod=1, i=0; if(0==B%M) //best case { printf("0\n"); continue; } else if(B>M) //let B < M B%=M; while(1<P) { if(1==P%2) { mod*=B; if(mod>M) mod%=M; } P/=2...