Show all threads Hide all threads Show all messages Hide all messages |
WA 9 | Mortus | 1440. Training Schedule | 17 Oct 2023 15:18 | 1 |
WA 9 Mortus 17 Oct 2023 15:18 spell the months correctly |
Why does my code get runtime error at test #6? | Maxim Rodionov | 1440. Training Schedule | 10 Apr 2023 02:40 | 1 |
Im an idiot I wrote "Saturtay" instead Saturday Edited by author 10.04.2023 02:46 |
For Admin.... Please check Test 10. | Adham (TWYT Union) | 1440. Training Schedule | 27 Mar 2014 16:05 | 1 |
I think my program is correct but i have not accepted yet. why wrong answer #10.. please give me Test 10. |
Wrong test? | Nodir NAZAROV Komilijonovich [TUIT-Karshi] | 1440. Training Schedule | 25 Mar 2014 23:08 | 1 |
Wrong test? Nodir NAZAROV Komilijonovich [TUIT-Karshi] 25 Mar 2014 23:08 I think there can be several correct answers, and not all of them are accepted. Is order of days important (Monday, Wednesday, Saturday == Saturday, Monday, Wednesday)? For 3rd test my program prints "Monday, Tuesday, Wednesday" which gives 14 days. Why I got WA#3? Thanks |
If you have WA #7 | Smilodon_am [Obninsk INPE] | 1440. Training Schedule | 16 Apr 2012 11:51 | 1 |
Try this test: Sunday December 24 17 17 Answer: 1 Monday |
WA5 | M@STeR.SoBG | 1440. Training Schedule | 16 Jan 2009 01:07 | 3 |
WA5 M@STeR.SoBG 12 Apr 2008 20:16 What is 5th test? could anybody help me?? Some ideas, some tests... Monday December 24 17 17 Right answer is 1 Tuesday Re: WA5 Oleg Strekalovsky [Vologda SPU] 16 Jan 2009 01:07 The idia of solution is simple. You mast calculate counts of each day of Week from 2 Sep to limit date-1. After then , you mast select days, acording they count. Complexity = 2^7 |
For those who has WA20 | Carbon | 1440. Training Schedule | 8 Feb 2008 03:46 | 1 |
Try this: Monday September 2 1 1 The answer is Impossible |
No subject | WB | 1440. Training Schedule | 12 Nov 2007 17:23 | 2 |
wrong #6 Any tests please? Edited by author 20.04.2006 13:29 Monday September 9 7 20 The answer is: 7 Monday Tuesday Wednesday Thursday Friday Saturday Sunday and not Impossible! |
WA 6 Help!!! | Denis | 1440. Training Schedule | 12 Nov 2007 17:07 | 1 |
Huh, silly mistake! My power of 2 was 6 instead of 7! Edited by author 12.11.2007 17:24 |
To be careful! the last day is the day before the match! | Dan.hu | 1440. Training Schedule | 24 Feb 2007 21:22 | 1 |
|
Clarification (+) | Dmitry 'Diman_YES' Kovalioff | 1440. Training Schedule | 4 Apr 2006 22:21 | 1 |
Days: 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday', 'Sunday' Months: 'September', 'October', 'November', 'December' |
How to print the week days (Capital letter)? | Alexey | 1440. Training Schedule | 4 Apr 2006 20:49 | 1 |
Hi! *********************************************************** Can U tell me How to print the week days? Capital letters must be or not? *********************************************************** And would U be so kind to give me some tests to find a mistake (or mistakes) in my program... Thanks a lot. Magistr. |
WA#3 | Ivanidze | 1440. Training Schedule | 27 Mar 2006 12:34 | 1 |
WA#3 Ivanidze 27 Mar 2006 12:34 I'm use full search, but got WA on test 3. help me plz! {$APPTYPE CONSOLE} Var BeDa:integer; endDe:integer; Tren:Array[0..6]of byte; max,min:integer; function Da(s:string; x:integer):integer; var t:integer; begin if s='September' then t:=0; if s='October' then t:=30; if s='November' then t:=61; if s='December' then t:= 91; da:=t+x; end; Procedure Init; var i,e:integer; s,s1:string; begin readln(s); if s='Monday' then BeDa:=0; if s='Tuesday' then BeDa:=1; if s='Wednesday' then BeDa:=2; if s='Thursday' then BeDa:=3; if s='Friday' then BeDa:=4; if s='Saturday' then BeDa:=5; if s='Sunday' then BeDa:=6; readln(s); i:=pos(' ',s); s1:=copy(s,i+1,length(s)-i); delete(s,i,length(s)-i+1); val(s1,i,e); endde:=da(s,i); readln(min,max); end; procedure Print; var i:integer; c:integer; begin for i:=0 to 6 do if Tren[i]=1 then inc(c); writeln(c); if Tren[0]=1 then writeln('Monday'); if Tren[1]=1 then writeln('Tuesday'); if Tren[2]=1 then writeln('Wednesday'); if Tren[3]=1 then writeln('Thursday'); if Tren[4]=1 then writeln('Friday'); if Tren[5]=1 then writeln('Saturday'); if Tren[6]=1 then writeln('Sunday'); end; Procedure Solve; var i,j,c,u:integer; begin for i:=1 to 127 do begin c:=0; u:=i; for j:=0 to 6 do begin Tren[j]:= u mod 2; u:=u div 2; end; for j:= 1 to endde-2 do if Tren[(j+Beda) mod 7]=1 then inc(c); if (c<=max)and(c>=min) then begin print; exit; end; end; Writeln('Impossible'); end; begin init; Solve; end. |