You can do something like this:

freopen("input.in","rt",stdin);

and use the standard input stream (cin && scanf ) to read the input from
the file.


On Fri, Apr 13, 2012 at 10:36 PM, Swaraj Khadanga <[email protected]>wrote:

> some one please let me know how to use .in file in my written program
>
> On 4/14/12, preetam shivaram <[email protected]> wrote:
> > Thanx alot guys ..cheers
> >
> >
> > On 14 April 2012 00:08, anujCD247 <[email protected]> wrote:
> >
> >> they are available on the code jam's website,go to practice and then
> there
> >> will be link to different questions of previous year.
> >>
> >>
> >> On Saturday, April 14, 2012 12:04:40 AM UTC+5:30, preetam shivaram
> wrote:
> >>>
> >>> Dude could u send me the links of the previous solutions
> >>>
> >>>
> >>> On 13 April 2012 23:59, Anuj Singh Kanyal <[email protected]> wrote:
> >>>
> >>>> yes , i have seen some solutions of previous code jam and i think the
> >>>> program should read the input file and also how can we manually enter
> so
> >>>> many test cases.
> >>>>
> >>>>
> >>>> On Fri, Apr 13, 2012 at 11:48 PM, preetam shivaram <
> >>>> [email protected]> wrote:
> >>>>
> >>>>> Guys, i am a first time participant... so tell me if i'm right, the
> >>>>> input as to be taken as a file input from .in file ... this input
> shud
> >>>>> be
> >>>>> done by the code itself ri8 ???
> >>>>>
> >>>>>
> >>>>> On 13 April 2012 23:44, Paul Smith <[email protected]> wrote:
> >>>>>
> >>>>>> The problem itself will tell you.  It depends on the problem but
> >>>>>> either a test case will be a specific number of lines long, or, if
> >>>>>> it's variable, one of the first lines of the case will tell you how
> >>>>>> long the case is.
> >>>>>>
> >>>>>> The first line of the input as a whole is usually the number of test
> >>>>>> cases.
> >>>>>>
> >>>>>> Of course, this has been true for previous years and might not
> >>>>>> necessarily be true for this or future years.
> >>>>>>
> >>>>>> Paul Smith
> >>>>>>
> >>>>>> [email protected]
> >>>>>>
> >>>>>>
> >>>>>>
> >>>>>> On Fri, Apr 13, 2012 at 6:47 PM, anujCD247 <[email protected]>
> >>>>>> wrote:
> >>>>>> > how can we differentiate different test cases in the input file(by
> >>>>>> space or
> >>>>>> > newline or by what factor)
> >>>>>> >
> >>>>>> > --
> >>>>>> > You received this message because you are subscribed to the Google
> >>>>>> Groups
> >>>>>> > "Google Code Jam" group.
> >>>>>> > To view this discussion on the web visit
> >>>>>> > https://groups.google.com/d/**msg/google-code/-/8tcG9Y77my4J<
> https://groups.google.com/d/msg/google-code/-/8tcG9Y77my4J>
> >>>>>> **.
> >>>>>> > To post to this group, send email to [email protected]
> .
> >>>>>> > To unsubscribe from this group, send email to
> >>>>>> > google-code+unsubscribe@**googlegroups.com<
> google-code%[email protected]>
> >>>>>> .
> >>>>>> > For more options, visit this group at
> >>>>>> > http://groups.google.com/**group/google-code?hl=en<
> http://groups.google.com/group/google-code?hl=en>
> >>>>>> .
> >>>>>>
> >>>>>> --
> >>>>>> You received this message because you are subscribed to the Google
> >>>>>> Groups "Google Code Jam" group.
> >>>>>> To post to this group, send email to [email protected].
> >>>>>> To unsubscribe from this group, send email to
> google-code+unsubscribe@
> >>>>>> **googlegroups.com <google-code%[email protected]>.
> >>>>>> For more options, visit this group at http://groups.google.com/**
> >>>>>> group/google-code?hl=en<
> http://groups.google.com/group/google-code?hl=en>
> >>>>>> .
> >>>>>>
> >>>>>>
> >>>>>  --
> >>>>> You received this message because you are subscribed to the Google
> >>>>> Groups "Google Code Jam" group.
> >>>>> To post to this group, send email to [email protected].
> >>>>> To unsubscribe from this group, send email to
> google-code+unsubscribe@*
> >>>>> *googlegroups.com <google-code%[email protected]>.
> >>>>> For more options, visit this group at http://groups.google.com/**
> >>>>> group/google-code?hl=en<
> http://groups.google.com/group/google-code?hl=en>
> >>>>> .
> >>>>>
> >>>>
> >>>>
> >>>>
> >>>> --
> >>>> *CD247*
> >>>>
> >>>>
> >>>>  --
> >>>> You received this message because you are subscribed to the Google
> >>>> Groups "Google Code Jam" group.
> >>>> To post to this group, send email to [email protected].
> >>>> To unsubscribe from this group, send email to google-code+unsubscribe@
> **
> >>>> googlegroups.com <google-code%[email protected]>.
> >>>> For more options, visit this group at http://groups.google.com/**
> >>>> group/google-code?hl=en<
> http://groups.google.com/group/google-code?hl=en>
> >>>> .
> >>>>
> >>>
> >>>  --
> >> You received this message because you are subscribed to the Google
> Groups
> >> "Google Code Jam" group.
> >> To view this discussion on the web visit
> >> https://groups.google.com/d/msg/google-code/-/ZhOIwmPuM_YJ.
> >>
> >> To post to this group, send email to [email protected].
> >> To unsubscribe from this group, send email to
> >> [email protected].
> >> For more options, visit this group at
> >> http://groups.google.com/group/google-code?hl=en.
> >>
> >
> > --
> > You received this message because you are subscribed to the Google Groups
> > "Google Code Jam" group.
> > To post to this group, send email to [email protected].
> > To unsubscribe from this group, send email to
> > [email protected].
> > For more options, visit this group at
> > http://groups.google.com/group/google-code?hl=en.
> >
> >
>
> --
> You received this message because you are subscribed to the Google Groups
> "Google Code Jam" group.
> To post to this group, send email to [email protected].
> To unsubscribe from this group, send email to
> [email protected].
> For more options, visit this group at
> http://groups.google.com/group/google-code?hl=en.
>
>


-- 
Regards,
*Moustafa Farid*

M.Sc Student | CSE Department | E-JUST
Teaching assistant | Faculty of engineering | Tanta University

Mob : +20 (0)111 822 6753

-- 
You received this message because you are subscribed to the Google Groups 
"Google Code Jam" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/google-code?hl=en.

Reply via email to