Search found 98 matches

by hamedv
Sat Jul 28, 2007 5:12 pm
Forum: Volume 9 (900-999)
Topic: 967 - Circular
Replies: 23
Views: 12795

i got wa.
what's wrong with my code???

Code: Select all

ACed
by hamedv
Fri Jul 27, 2007 9:05 pm
Forum: Off topic (General chit-chat)
Topic: What is your record of solved problems during one day?
Replies: 18
Views: 68922

today i solved 12 problems in volume 104
by hamedv
Thu Jul 26, 2007 8:34 pm
Forum: Volume 112 (11200-11299)
Topic: 11237 - Halloween treats
Replies: 11
Views: 5737

I got TLE

can any one explain his algorithm :cry:
by hamedv
Thu Jul 26, 2007 11:16 am
Forum: Volume 7 (700-799)
Topic: 727 - Equation
Replies: 156
Views: 35005

and another code with printf(), scanf() :cry: #include <stdio.h> #include <ctype.h> #include <iostream> using namespace std; char a[100]; int i_a; bool empty() { return i_a == -1; } void push(char c) { a[++i_a] = c; } void pop() { if (!empty()) i_a--; } char top() { if (!empty()) return a[i_a]; retu...
by hamedv
Thu Jul 26, 2007 10:43 am
Forum: Volume 7 (700-799)
Topic: 727 - Equation
Replies: 156
Views: 35005

what's wrong with my code??? i'm getting WA #include <iostream> #include <cstdio> #include <string> #include <cctype> #include <stack> using namespace std; int main() { stack<char> mystack; string s; char c[5]; int t; cin >> t; gets(c); gets(c); while (t--) { s = ""; while (!mystack.empty()) mystack...
by hamedv
Wed Jul 25, 2007 6:17 pm
Forum: Off topic (General chit-chat)
Topic: What game do you like best?
Replies: 17
Views: 62014

I LOVE ARCADE GAMES :D
by hamedv
Wed Jul 25, 2007 4:37 pm
Forum: Off topic (General chit-chat)
Topic: if u need specific type problem...
Replies: 1
Views: 26567

one of them is
10338
by hamedv
Tue Jul 24, 2007 8:05 pm
Forum: Volume 102 (10200-10299)
Topic: 10276 - Hanoi Tower Troubles Again!
Replies: 9
Views: 6654

Finally i got ac;
for n = 2 my optput was wrong
by hamedv
Tue Jul 24, 2007 3:53 pm
Forum: Volume 105 (10500-10599)
Topic: 10533 - Digit Primes
Replies: 108
Views: 31902

change your sieve function to

Code: Select all

void s(void)
{
   long i,j;
   data[0]=1;
   data[1]=1;
   for(i=4;i<SIZE;i+=2)
      data[i]=1;
   for(i=3;i<SIZE;i+=2)
      for(j=2;i*j<SIZE;j++)
      {
         if(!data[i*j])
            data[i*j]=1;
			}
}
by hamedv
Tue Jul 24, 2007 1:44 pm
Forum: Volume 102 (10200-10299)
Topic: 10276 - Hanoi Tower Troubles Again!
Replies: 9
Views: 6654

what's wrong with my code??? :cry:

Code: Select all

ACed
by hamedv
Sun Jul 22, 2007 4:33 pm
Forum: Volume 112 (11200-11299)
Topic: 11239 - Open Source
Replies: 21
Views: 7931

i changech my code to : #include <algorithm> #include <iostream> #include <cstdio> #include <string> #include <set> using namespace std; struct project { string name; set<string> student; int num; }; struct tot { string name[10010]; int n[10010], i; }; string getstring() { char s[100]; gets(s); stri...
by hamedv
Sun Jul 22, 2007 3:18 pm
Forum: Volume 2 (200-299)
Topic: 216 - Getting in Line
Replies: 57
Views: 24646

actually i did'nt read the problem statement
:oops:
by hamedv
Sun Jul 22, 2007 2:20 pm
Forum: Volume 2 (200-299)
Topic: 216 - Getting in Line
Replies: 57
Views: 24646

finally i got AC
i changed my distance function
from

Code: Select all

double d(int x1, int y1, int x2, int y2)
{
	return sqrt((x1-x2)*(x1-x2)+(y1-y2)*(y1-y2));
}
to

Code: Select all

double d(int x1, int y1, int x2, int y2)
{
	return sqrt((x1-x2)*(x1-x2)+(y1-y2)*(y1-y2))+16;
}
why? i don't know
can anyone tell me :-?[/code]
by hamedv
Sat Jul 21, 2007 6:43 pm
Forum: Volume 112 (11200-11299)
Topic: 11219 - How old are you?
Replies: 117
Views: 33852

can u pm me your full code???
by hamedv
Sat Jul 21, 2007 2:06 pm
Forum: Volume 2 (200-299)
Topic: 216 - Getting in Line
Replies: 57
Views: 24646

it gives the output correct but gives the distance wrong??? :(

Go to advanced search