Search found 127 matches

by Subeen
Sun Nov 09, 2003 7:30 am
Forum: Volume 105 (10500-10599)
Topic: 10578 - The Game of 31
Replies: 11
Views: 4873

Maarten, your input function seems ok to me but didn't produce the last output in my pc. Instead you can use:
[c]while(gets(line))[/c]

And the output for your input is

Code: Select all

 A
1 A
2 A
3 B
4 B
5 A
6 B
by Subeen
Sun Nov 02, 2003 10:23 am
Forum: Off topic (General chit-chat)
Topic: Participating in the ICPC regionals?
Replies: 22
Views: 7575

Hello! This is Tamim Shahriar ( Subeen ) . I study in Shahjalal University of Science and Technology, Sylhet, Bangladesh. I am going to participate in ACM ICPC Regional (Dhaka Site) on November 12-13. My current team name is SUST Pulverizer . This is my second participation in ICPC Regional. Last ye...
by Subeen
Sun Nov 02, 2003 10:05 am
Forum: Volume 5 (500-599)
Topic: 526 - String Distance and Transform Process
Replies: 34
Views: 15492

I am getting WA with my program. Please give me some sample input for which my program fails. Here is my code: [cpp]#include <stdio.h> #include <string.h> #define MATCH 0 #define INSERT 1 #define DELETE 2 #define MAXLEN 85 typedef struct { int cost; int parent; }cell; cell m[MAXLEN+1][MAXLEN+1]; int...
by Subeen
Wed Oct 22, 2003 2:36 pm
Forum: Volume 105 (10500-10599)
Topic: 10530 - Guessing Game
Replies: 57
Views: 27477

sumankar, ur program produces wrong output for this test case:
7
too high
3
too high
7
too high
6
too high
7
too high
7
too high
6
right on
zubair, please remove ur code from ur post.
by Subeen
Tue Oct 21, 2003 6:41 am
Forum: Volume 105 (10500-10599)
Topic: 10530 - Guessing Game
Replies: 57
Views: 27477

zubair,
replace gets(str);
with
scanf(" %[^\n]", str);
and u will get it AC
by Subeen
Sun Oct 19, 2003 9:52 pm
Forum: Volume 104 (10400-10499)
Topic: 10446 - The Marriage Interview :-)
Replies: 17
Views: 9514

I spend a lot of time but can't get this problem AC yet. What's the problem is my code? Here is it: [c]#include <stdio.h> typedef unsigned long long int datatype; void main() { datatype t[65][65]; int i, j, k, n=61, back, kase; datatype temp; for(i=0; i<=n; i++) t[0] = t[1] = 1; for(i=2; i<=n; i++) ...
by Subeen
Sun Oct 19, 2003 9:38 pm
Forum: Volume 105 (10500-10599)
Topic: 10530 - Guessing Game
Replies: 57
Views: 27477

zubair, check the input:
6
too high
6
too high
3
too low
2
too low
8
too high
10
too high
4
right on
output should be ? :wink:
by Subeen
Fri Oct 17, 2003 12:44 pm
Forum: Volume 102 (10200-10299)
Topic: 10261 - Ferry Loading
Replies: 41
Views: 19224

got RTE

I got Runtime Error (SIGSEGV) with my program. Please help me to find the bug. [c]#include <stdio.h> #define MAXN 201 #define MAXL 10001 int length[MAXN]; int knapsack(int itemsTaken[][MAXL], int n, int maxL) { int i, j; int C[MAXN][MAXL]; for(i=0; i<=n; i++) for(j=0; j<=maxL; j++) itemsTaken [j] = ...
by Subeen
Thu Oct 16, 2003 4:26 pm
Forum: Volume 105 (10500-10599)
Topic: 10555 - Dead Fraction
Replies: 35
Views: 15610

heavy discussions going on... :o but stupid me can't get the problem AC, got WA. :( passed all the test cases posted is this thread. here is my code - [c]#include <stdio.h> #include <stdlib.h> #include <string.h> #include <math.h> long gcd(long a, long b) { return (b == 0) ? a : gcd(b, a%b); } void ...
by Subeen
Thu Oct 16, 2003 12:22 pm
Forum: Volume 104 (10400-10499)
Topic: 10449 - Traffic
Replies: 58
Views: 21368

I m getting WA with the code below: :) please help. [c]#include <stdio.h> #define MAXEDGE 40210 #define MAXNODE 202 #define INF 1000000000L struct s { int x; int y; int w; }edge[MAXEDGE]; long d[MAXNODE]; int busyness[MAXNODE]; int containsCycle[MAXNODE]; int n, m; /* n -> number of vertices, m -> n...
by Subeen
Thu Oct 16, 2003 8:15 am
Forum: Volume 105 (10500-10599)
Topic: 10570 - Meeting with Aliens
Replies: 17
Views: 8857

thanks to mehedi bhai and Per.

Larry,
for input: 3 1 2 5 7 6 4
if we swap 2<->1, then 5<->6 and then 6<->7
we get, 3 2 1 7 6 5 4, which can be arranged as: 1 2 3 4 5 6 7.

so it takes only 3 swaps, not 4, am I right?
by Subeen
Thu Oct 16, 2003 6:33 am
Forum: Volume 105 (10500-10599)
Topic: 10570 - Meeting with Aliens
Replies: 17
Views: 8857

How the input :
6
3 1 2 5 6 4

produces output:
2

please explain it to me. ( i think the output should be 3 )
by Subeen
Thu Oct 16, 2003 6:24 am
Forum: Volume 103 (10300-10399)
Topic: 10342 - Always Late
Replies: 25
Views: 10852

My program passes all the testcases in this thread ( and also some generated by me ). but getting WA. :cry: can you test my program with some inputs so that I can understand whether the bug is in my algorithm or in the code. [c]#include <stdio.h> #define INF 1000000000L #define MAXNODES 105 long int...
by Subeen
Sat Oct 11, 2003 12:28 pm
Forum: Volume 105 (10500-10599)
Topic: 10562 - Undraw the Trees
Replies: 18
Views: 6797

thanks, hewei. I will be more careful about making stupid assumptions.
by Subeen
Thu Oct 09, 2003 12:46 pm
Forum: Other words
Topic: Overloaded judge during contests
Replies: 21
Views: 3920

may volunteer judges can be used for checking only the following things:-
1. there is no submission error
2. the code compiles.
3. no restricted function used.
4. memory used is within the limits
5. and sample input/output matches

Go to advanced search