ENG  RUS Timus Online Judge
Online Judge
Problems
Authors
Online contests
Site news
Webboard
Problem set
Submit solution
Judge status
Guide
Register
Authors ranklist
Current contest
Scheduled contests
Past contests
Rules
back to board

Discussion of Problem 1070. Local Time

Who give me some tests?
Posted by ILYA 22 Jun 2006 17:16
Pozhaluysta, kto-nibud', dayte mne hot' kakie testy k zadache 1070! A to vse testi, kotoriye u menya yest' moya programma prohodit, no na teste #1 dayot nepravil'niy otvet!
I obyasnite, pochemu mozhet byt' test:
"12.00 15.00
01.02 03.07
Re: Who give me some tests?
Posted by AndrewSt 22 Jun 2006 20:58
1)
23.42 01.14
08.10 17.51
2)
01.01 10.59
04.23 04.22
3)
12.00 15.00
01.02 03.07
4)
23.58 00.43
22.27 03.10
5)
12.00 15.00
20.00 21.00
6)
01.01 21.59
04.23 11.22
Re: Who give me some tests?
Posted by pedmustdie(Vologda STU) 14 Aug 2006 20:32
Potomu chto okruglyaetcya do nulya (chisla celye)
Kstati ya poluchil AC no u menya bolshaya proga. Kto-nibud mojet obyacnit kak cdelat koroche?

[code deleted]

Edited by moderator 29.12.2006 09:12
Re: Who give me some tests?
Posted by Metallllllll 28 Dec 2006 20:12
AndrewSt wrote 22 June 2006 20:58
1)
23.42 01.14
08.10 17.51
2)
01.01 10.59
04.23 04.22
3)
12.00 15.00
01.02 03.07
4)
23.58 00.43
22.27 03.10
5)
12.00 15.00
20.00 21.00
6)
01.01 21.59
04.23 11.22
Can you explain me why on test 6 -> answer is 5 ?

Edited by author 28.12.2006 20:13
Re: Who give me some tests?
Posted by chensqi 21 Dec 2008 08:19
my programe can pass all your tests#,but i WA at ural's test#1,why...?
does someone can help me?

#include <stdio.h>
main()
{
int i,j,k;

scanf("%lf%lf%lf%lf",&ch[1],&ch[2],&ch[3],&ch[4]);
for(i=1;i<=4;i++)
{
time1[i]=(int)ch[i];
time2[i]=ch[i]-time1[i];
if((i==2 || i==4) && time1[i]<time1[i-1]) time1[i]+=24;
}
hour=time1[3]-time1[4]+time1[2]-time1[1];
mini=time2[3]-time2[4]+time2[2]-time2[1];
hour=abs(hour+mini*5.0/3.0);
hour/=2;
if(hour>5) hour=5;
printf("%.0lf",hour);
}
Re: Who give me some tests?
Posted by ahmedov(NUUz_2) 15 Mar 2009 23:33
Re: Who give me some tests?
Posted by Rafikov Ramil 28 Sep 2009 21:24
answer is 5, because max difference in time = 5 hours))

then all answers >5 , =5 !

Edited by author 28.09.2009 21:26
Re: Who give me some tests?
Posted by -XraY- 23 Dec 2010 22:22