Search found 5 matches

by tomtom85
Tue Jun 08, 2010 9:01 am
Forum: Volume 101 (10100-10199)
Topic: 10137 - The Trip
Replies: 159
Views: 70567

Re:

for (int i = 0; i < numPpl; i++) {
cin >> temp;
avg += (int) (temp * 10000 + 1e-9) / numPpl;
cents = (int) (temp * 100 + 1e-9);
top = max(top, cents );



Can someone explain " + 1e-9 " ???

thx a lot........
Probably this is a little late, the 1e-9 is an epsilon, sometimes when you have ...
by tomtom85
Tue Jun 08, 2010 12:48 am
Forum: Volume 101 (10100-10199)
Topic: 10137 - The Trip
Replies: 159
Views: 70567

Re: 10137 - The Trip

I dont understand whats happening (yea i know you have read this many times but). I got AC on http://www.programming-challenges.com with this code and here i get WA. This is like uber odd. here is the code if someone is willing to help.


#include <stdio.h>
#include <math.h>
int main(){

int ...
by tomtom85
Thu Jun 03, 2010 3:46 pm
Forum: Volume 102 (10200-10299)
Topic: 10267 - Graphical Editor
Replies: 190
Views: 77608

Re: 10267 - Graphical Editor

Hello, i have been reading all the post in general, i have checked all the posible mistakes and i keep getting WA. If anybody could check my code and point an error i will be very gratefull.
here it is!


#include <stdio.h>
int M=0,N=0,matrix[252][252];

int getInt(char a){
return ((int)a-48 ...
by tomtom85
Thu Jun 03, 2010 7:50 am
Forum: Volume 102 (10200-10299)
Topic: 10267 - Graphical Editor
Replies: 190
Views: 77608

Re: 10267 - Graphical Editor

Hello, i have been reading all the post in general, i have checked all the posible mistakes and i keep getting WA. If anybody could check my code and point an error i will be very gratefull.
here it is!


#include <stdio.h>
int M=0,N=0,matrix[252][252];

int getInt(char a){
return ((int)a-48 ...
by tomtom85
Tue Jun 01, 2010 7:56 am
Forum: Volume 102 (10200-10299)
Topic: 10267 - Graphical Editor
Replies: 190
Views: 77608

Re: 10267 - Graphical Editor

Hello, i have been reading all the post in general, i have checked all the posible mistakes and i keep getting WA. If anybody could check my code and point an error i will be very gratefull.
here it is!


#include <stdio.h>
int M=0,N=0,matrix[252][252];

int getInt(char a){
return ((int)a-48 ...

Go to advanced search