Search found 7 matches

by Nahiyan Kamal
Thu May 06, 2010 7:29 am
Forum: Volume 117 (11700-11799)
Topic: 11775 - Unique Story
Replies: 1
Views: 2179

Re: WA:11775(Unique Story)

in your code
in bigmode function
you have declared long
but return x*x;
this might be very big.
this is an error. you need long long here iguess


another mistake i believe is in your algorithm
what will be the output in this case:
1
A1B1
B1A1

i think there are two unique sequences A1B1 B1A1
but ...
by Nahiyan Kamal
Thu Sep 24, 2009 7:32 pm
Forum: Volume 113 (11300-11399)
Topic: 11389 - The Bus Driver Problem
Replies: 10
Views: 10290

Re: 11389 - The Bus Driver Problem

can anyone show me why sorting and adding like this gives the minimum result? can anyone show the proof?
by Nahiyan Kamal
Mon Sep 14, 2009 6:59 pm
Forum: Volume 114 (11400-11499)
Topic: 11493 - The Club Ballroom
Replies: 0
Views: 1944

11493 - The Club Ballroom

Please give me some critical test cases for this prob
by Nahiyan Kamal
Sat Sep 12, 2009 11:52 pm
Forum: Volume 115 (11500-11599)
Topic: 11505 - Logo
Replies: 8
Views: 14729

Re: 11505 - LOGO

please help.im getting wa. heres my code.

#include<iostream>
#include<string.h>
#include<math.h>
#define pi 2*acos(0.0)/180
using namespace std;

int main()
{
long cases,n;
double x,y,k;
double thita;
double f,g;
long F,G;

while(scanf("%ld",&cases)==1)
{
while(cases--)
{
x=0,y=0;
thita ...
by Nahiyan Kamal
Sun Sep 06, 2009 10:35 pm
Forum: Volume 116 (11600-11699)
Topic: 11628 - Another lottery
Replies: 2
Views: 3016

Re: 11628 getting WA

ok ive got ac, there was a silly mistake.ive removed my code.howevr these input output are ok
by Nahiyan Kamal
Sat Sep 05, 2009 11:53 am
Forum: Volume 116 (11600-11699)
Topic: 11633 - Food portion sizes
Replies: 2
Views: 2271

11633 - Food portion sizes

can anyone help me how to solve this problem? i have thought of a solution like this:

S=ax+by

let the food portion size if u

for first person,

i1=amount he needs
x1= amount wasted
y1=how many times he goes to fetch food

x1=u*ceil(i1/u)-i1
y1=ceil(i1/u)

s1=ax1+by1=(au+b)*ceil(i1/u)-a*i1 ...
by Nahiyan Kamal
Fri Sep 04, 2009 7:39 am
Forum: Volume 116 (11600-11699)
Topic: 11628 - Another lottery
Replies: 2
Views: 3016

11628 - Another lottery

Here is my code

removed after ac

here are some input output i got from my program.

input:
5 4
3 1 2 0
3 1 2 0
3 1 3 0
4 4 4 0
5 5 0 4
1 1
1
5 4
21 21 54 87
56 89 23 21
654 987 321 0
12 56 57 59
10 20 30 60
6 4
0 0 0 0
1 1 1 1
0 0 0 0
2 5 6 4
0 2 6 1
0 0 0 0
0 0

Output:
0 / 1
0 / 1
0 / 1
0 / 1 ...

Go to advanced search