Show all threads Hide all threads Show all messages Hide all messages |
Hint - Illustration | Daniil | 1893. A380 | 3 Apr 2024 19:41 | 2 |
( window | A | aisle |B C| aisle | D | window )-- Premium (1-2) ( window | A B| aisle |C D| aisle |E F | window )-- Business (3-20) ( window | A B C| aisle |D E F G| aisle |H G K | window )-- Economy (21-64) Edited by author 30.05.2022 16:38 |
test 1 dan qaytvotti xatosi qatta? | Chornovek | 1893. A380 | 17 Feb 2020 14:26 | 2 |
VAR s:string; k,n,l,c:Longint; begin read(s); l:=length(s); val(s,n,c); if (n<3) and (n>0) then begin k:=0; case s[l] of 'a','A': write('window'); 'D','d': write('window'); 'b','B': write('aisle'); 'c','C': write('aisle'); end; end; if (n>=3) and (n<=20) then begin k:=0; case s[l] of 'a','A': write('window'); 'f','F': write('window'); 'b','B': write('aisle'); 'd','D': write('aisle'); 'E','e': write('aisle'); 'c','C': write('aisle'); end; end; if (n>=21) and (n<=65) then begin k:=0; case s[l] of 'a','A': write('window'); 'k','K': write('window'); 'g','G': write('aisle'); 'd','D': write('aisle'); 'h','H': write('aisle'); 'c','C': write('aisle'); 'b','B': write('neither'); 'e','E': write('neither'); 'f','F': write('neither'); 'J','j': write('neither'); end; end; if n>65 then write('neither'); end. Edited by author 20.11.2012 23:14 Please, write your messages in English, because it's international language. We, Russians, don't understand O'zbek |
Row 1 & 2 | Nguyen Khac Tung | 1893. A380 | 12 Oct 2018 01:46 | 6 |
As i read the problem, the configuration of two first rows are : Window | A | Aisle | B | C | Aisle | D | Window I check with my program and for 1A 'window' is AC while 'aisle' gives WA6 Edited by author 30.10.2011 20:54 Edited by author 30.10.2011 20:54 Wrong. The configuration is: Window |A||B| Aisle |C||D| Window Why would the configuration be that way? "The aisles in this section are between the first and second seats and between the third and fourth seats of each row." That means that the configuration Window | A | Aisle | B | C | Aisle | D | Window is correct That is the configuration, however the problem requires: "If the seat is next to the window, output “window”. Otherwise, if the seat is next to the aisle, output “aisle”. If neither is true, output “neither”. " This implies if it is both an aisle and a window, the correct answer is window. (if window print window, else if aisle print aisle, else print neither) Hey, man. Thanks a lot for your help thanks bro for your help :-) |
hhahah | deep | 1893. A380 | 11 Mar 2018 11:12 | 1 |
del Edited by author 11.03.2018 11:13 Edited by author 11.03.2018 11:13 |
case 4:Output limit exceeded. help! | jim | 1893. A380 | 7 Mar 2018 19:58 | 1 |
output limit exceeded! what's the case 4 like? 3Q |
WA16 pascal | grdaria | 1893. A380 | 23 Feb 2017 14:59 | 1 |
whats wrong? program fly; const okn='window'; ser='neither'; proh='aisle'; var i,r,n,bb:integer; s,s1:string; m:char; begin readln(s); n:=length(s); m:=s[n]; s1:=s; delete(s1,n,1); val(s1,r,bb); if r<3 then if (m='A') or (m='D') then writeln(okn) else writeln(proh) else if r<21 then if (m='A') or (m='F') then writeln(okn) else writeln(proh) else if r<65 then if (m='A') or (m='K') then writeln(okn) else if (m='C') or (m='D') or (m='G') or (m='H') then writeln(proh) else writeln(ser); end. |
Strange Aeroplane | IlushaMax | 1893. A380 | 19 Mar 2016 01:25 | 1 |
window | ******| window window?|****|window? The distance between window and last chairs is 1 chair but it's there! Windows can be only in Business and Econom cause these parts are in different decks. |
can someone tell me what is test #5??? | bigtik | 1893. A380 | 24 Nov 2015 20:59 | 2 |
can someone tell me what is test #5??? 5 test 1 or 2 - A or D Edited by author 24.11.2015 21:12 |
WA3???...........Plz help | alok13alok | 1893. A380 | 1 Nov 2015 22:27 | 2 |
import java.util.Scanner; public class A380 { public static void main(String agrs[]){ Scanner sys=new Scanner(System.in); String input=sys.next(); String[] part=input.split("(?<=\\d)(?=\\D)"); int num=Integer.parseInt(part[0]); if(num==1 || num==2){ if(part[1].equals("A")||part[1].equals("D")) System.out.println("window"); else if(part[1].equals("B")||part[1].equals("C")) System.out.println("aisle");
} else if(num>=3 && num<=20){ if(part[1].equals("A")||part[1].equals("F")) System.out.println("window"); else if(part[1].equals("B")||part[1].equals("C") || part[1].equals("D")||part[1].equals("E")) System.out.println("aisle");
} else if(num>=21 && num<=65){ if(part[1].equals("A")||part[1].equals("K")) System.out.println("window"); else if(part[1].equals("C")||part[1].equals("D") || part[1].equals("H")||part[1].equals("G")) System.out.println("aisle"); else if(part[1].equals("B")||part[1].equals("E") || part[1].equals("F")||part[1].equals("J")) System.out.println("niether"); }
} } |
WA62? | amirshir | 1893. A380 | 21 Dec 2014 18:38 | 1 |
WA62? amirshir 21 Dec 2014 18:38 |
c# accepted | pav1uxa | 1893. A380 | 20 Dec 2014 21:23 | 1 |
del Edited by author 06.01.2015 21:37 |
WA7 | armogirl | 1893. A380 | 23 Oct 2014 20:02 | 5 |
WA7 armogirl 16 Nov 2012 01:46 sorry, didn't notice that the letter I is omitted!! )) Re: WA7 PlayLinsor 3 Oct 2013 18:15 use correct alphabet A B C D E F G H K Re: WA7 IvanMetelev 23 Oct 2014 20:02 |
Another Hint | Inacio Medeiros | 1893. A380 | 9 Jun 2013 08:58 | 1 |
Try to "draw" the organization of seats, it helps a lot in writing algorithm solution. |
Hint: Brute force | RainbowDash | 1893. A380 | 7 Jun 2013 14:46 | 1 |
Brute force this question! There's really no reason to do anything else. |
whats wrong? | alexstyle | 1893. A380 | 3 Mar 2013 02:42 | 8 |
Edited by author 03.03.2013 02:41 Edited by author 03.03.2013 02:41 And a wrong way of inputing data. Then I should do it using a single string? Check it out. It works, but its still unclear for me why I dont get an AC. scanf ("%d %c",&p,&c); It is wrong :) |
raspuns2 | tudyrock | 1893. A380 | 25 Oct 2012 13:45 | 1 |
#include <iostream> using namespace std; int r; char n; int main() { cin >> r; cin >> n; if(r >= 1 && r <= 2 ) { if(n == 'A' || n == 'D' ) cout << "window"; else if(n == 'B' || n == 'C') cout << "aisle"; } else if( r >= 3 && r <= 20 ) { if(n=='A' || n=='F' ) cout << "window"; else if(n == 'B' || n == 'C' || n=='D' || n=='E' ) cout <<"aisle"; } else if(r >= 21 && r <= 65) { if (n=='A' || n=='K') cout<<"window"; else if(n=='B' || n=='E' || n=='F' || n=='J') cout <<"neither"; else if(n=='C' || n=='D' || n=='G' || n=='H') cout << "aisle"; }
return 0; } |
aici raspunsuri | tudyrock | 1893. A380 | 25 Oct 2012 13:44 | 1 |
#include<iostream> using namespace std; int n; char c; int main() { cin>>n>>c; if (n>=1 && n<=2) { if(c=='A') cout<<"window"; if(c=='D') cout<<"window"; if(c=='B') cout<<"aisle"; if(c=='C') cout<<"aisle"; } if(n>=3 && n<=20) { if(c=='A') cout<<"window"; if(c=='F') cout<<"window"; if(c=='B') cout<<"aisle"; if(c=='E') cout<<"aisle"; if(c=='C') cout<<"aisle"; if(c=='D') cout<<"aisle"; } if(n>=21 && n<=65) { if(c=='A') cout<<"window"; if(c=='K') cout<<"window"; if(c=='B') cout<<"neither"; if(c=='C') cout<<"aisle"; if(c=='D') cout<<"aisle"; if(c=='E') cout<<"neither"; if(c=='F') cout<<"neither"; if(c=='G') cout<<"aisle"; if(c=='H') cout<<"aisle"; if(c=='J') cout<<"neither"; } return 0; } si asta a lui rad Edited by author 25.10.2012 13:44 |
WA15 | TinyJanssen | 1893. A380 | 6 Sep 2012 00:21 | 2 |
WA15 TinyJanssen 6 Sep 2012 00:14 What is different with case #15. My program runs good for 14 tests. |
what is test case 51 = = | mpoporing | 1893. A380 | 17 May 2012 22:31 | 1 |
|
С чем связано неиспользование в A380 буквы "I" в номере ? | Шмиг Андрей aka SyFyKid [ВлГУ, ФРЭМТ, БМИ] | 1893. A380 | 4 May 2012 21:01 | 2 |
My be sign 'I' looks like Rome number. This sign has been removed for preventing potency muss. It's my supposition. |