Find nearby hotels in Singapore

#include <iostream> #include <cmath> #include <vector> using namespace std; struct Point { double latitude; double longitude; }; struct Hotel { string hotel_name; string street_address; double latitude; double longitude; }; double dist(const Point& p1, const Point& p2) { return sqrt(pow(p1.latitude - p2.latitude, 2) + pow(p1.longitude - p2.longitude, 2)); } // Source: "Hotels" by Hotels Licensing Board, https://data.gov.sg/dataset/hotels int main() { vector<Hotel> singapore_hotels = { {"Amoy Hotel","76 Telok Ayer Street",1.28300040113333,103.848645398988}, {"5Footway.Inn Project Ann Siang","269 South Bridge Road (Level 3)",1.28192549174616,103.845323101678}, {"5Footway.Inn Project Chinatown 1","63A Pagoda Street",1.28344956091802,103.84390352648501}, {"Adamson Inn","3 Jalan Pinang",1.3025871087949399,103.85843648727301}, {"Atlantis Pods @ Bugis","2 Tan Quee Lan Street",1.2980018359861698,103.856934794867}, {"Blue Jazz Hostel","243 Jalan Besar",1.3098259781038402,103.857905529572}, {"Butternuttree Hotel","22 Teck Lim Road Park 22 Hotel Chinatown",1.28063114528175,103.841824553603}, {"Campbell Inn","50 Campbell Lane Checkers Backpackers",1.30499476446971,103.85264159736}, {"City Inn Mackenzie","15 Mackenzie Road",1.30437834087265,103.849798667849}, {"Conrad Centennial Singapore","2 Temasek Boulevard",1.2935250479576998,103.858774754924}, {"Coral Hostel","5 Jalan Pinang",1.30260728302063,103.858380321169}, {"Cube @ Kampong Glam","55 Bussorah Street",1.30162128929279,103.859372518621}, {"Dorsett Singapore","333 New Bridge Road",1.27962669335411,103.840007595327}, {"Fragrance Hotel - Balestier","255 Balestier Road",1.3219735821712901,103.852659077831}, {"Fragrance Hotel - Classic","418 Balestier Road",1.32586369131216,103.84962082302799}, {"Fragrance Hotel - Kovan","760 Upper Serangoon Road",1.35406396766655,103.878733107903}, {"Fragrance Hotel - Oasis","435 Balestier Road",1.32588610345703,103.8486054596}, {"Fragrance Hotel - Rose","263 Balestier Road",1.32207596486577,103.852597254593}, {"Fragrance Hotel - Sapphire","3 Lorong 10 Geylang",1.31175752212564,103.877769463391}, {"Gap Year Hostel","322 Lavender Street",1.31564005310121,103.859427854855}, {"Golden Hostel","146 Jalan Bukit Merah",1.27784876908556,103.830811469037}, {"Hilton Garden Inn Singapore Serangoon","3 Belilios Road",1.30833561066946,103.851928683499}, {"Hotel 1887","25 Trengganu Street Opera House Hotel",1.2825676294462398,103.844175143979}, {"Hotel 81 - Kovan","768 Upper Serangoon Road",1.35420716577623,103.878866752237}, {"Hotel Ascendere","1 Lorong 10 Geylang",1.31192206820324,103.877736744734}, {"Hotel Boss","500 Jalan Sultan",1.3057132396992401,103.860266744256}, {"Hotel Chancellor @ Orchard","28 Cavenagh Road",1.3014598658526297,103.841931943184}, {"Hotel Classic","12 Joo Chiat Road",1.31564262735676,103.897717497536}, {"Hotel G Singapore","200 Middle Road Big Hotel",1.30091640274091,103.85150647448}, {"Hotel Michael","8 Sentosa Gateway",1.25493344205256,103.820219416964}, {"Shophouse The Social Hostel","48 Arab Street",1.30078637838364,103.859681428102}, {"Siloso Beach Resort","51 Imbiah Walk",1.2549872745081598,103.81450041670901}, {"Simpang De Bedok Boarding House","357A Bedok Road",1.33160107443218,103.94704995996099}, {"Singapore Marriott Tang Plaza Hotel","320 Orchard Road",1.30504624490474,103.832882399418}, {"So Sofitel Singapore","35 Robinson Road",1.27992197743655,103.849654800023}, {"Sofitel Singapore City Centre","9 Wallich Street",1.27690516875781,103.84507010968399}, {"Sofitel Singapore Sentosa Resort & Spa","2 Bukit Manis Road",1.24506009557476,103.82752571411899}, {"Hotel 81 - Violet","97 Lavender Street",1.3110678565746101,103.862164064764}, {"Hotel Bencoolen","47 Bencoolen Street",1.29918670454242,103.850108247512}, {"Hotel Bencoolen @ Hong Kong Street","47 Hongkong Street",1.28709359843454,103.84767231214899}, {"Hotel Clover 33 Jalan Sultan","33 Jalan Sultan",1.3020128092884,103.86172929908399}, {"Hotel Clover 5 Hongkong Street","5 Hongkong Street",1.28743139493495,103.847840910796}, {"Hotel Clover 7 Hongkong Street","7 Hongkong Street",1.2874637583689,103.84771156785999}, {"Hotel Clover 769 North Bridge Road","769 North Bridge Road",1.303670899422,103.859584188628}, {"Hotel Clover The Arts","58 South Bridge Road",1.28754165064775,103.84814134655599}, {"Hotel Compass","36 Lorong 22 Geylang",1.3110047955513502,103.881864226045}, {"Hotel Conforto","16 Carpenter Street",1.2883472894572499,103.84785583984001}, {"Hotel Fort Canning","11 Canning Walk",1.29581267692373,103.84536206187599}, {"Hotel Fuji","22 Jalan Molek",1.31170564297722,103.88267669572399}, {"Hotel Grand Central","22 Cavenagh Road",1.30129428988047,103.84176757080401}, {"Hotel Grand Pacific","101 Victoria Street",1.297294354874,103.852608380744}, {"Hotel Hamilton","40 Hamilton Road",1.3115415267143,103.861521235649}, {"Hotel Jen Orchardgateway Singapore","277 Orchard Road",1.3005095554006698,103.839224069817}, {"Hotel Jen Tanglin Singapore","1A Cuscaden Road",1.30427054178222,103.823912367777}, {"Hotel Kai","14 Purvis Street",1.29652179817965,103.855405316884}, {"Hotel Mi","41 Bencoolen Street",1.29898583395446,103.85002055272601}, {"Hotel Miramar Singapore","401 Havelock Road",1.2882199082308001,103.83741495522301}, {"Hotel Nuve","11 Jalan Pinang",1.30275141628816,103.85827529785101}, {"Hotel Nuve Urbane","3 King George's Avenue",1.30732089616467,103.85880512828001}, {"Hotel Re! @ Pearl's Hill","175A Chin Swee Road",1.28541003838201,103.83840728113}, {"Hotel Royal","36 Newton Road",1.3168306135891799,103.841859493265}, {"Hotel Royal @ Queens","12 Queen Street",1.29752626201801,103.85213309400801}, {"Hotel Snow Lavender","26 Cavan Road Hotel Snow",1.3108790572238602,103.861821606801}, {"Hotel Supreme","15 Kramat Road",1.3013393692631898,103.84242474015899}, {"Hotel Yan","162 Tyrwhitt Road",1.3098135555485202,103.85510881186501}, {"Ibis Styles Singapore On Macpherson","401 Macpherson Road",1.33177055027825,103.879294502591}, {"Innotel Hotel","11 Penang Lane",1.2976608120981399,103.844450628729}, {"Intercontinental Singapore","80 Middle Road",1.29846965440606,103.854866959203}, {"Intercontinental Singapore Robertson Quay","1 Nanson Road",1.28984103716127,103.83855171604999}, {"Istay.Inn","215A South Bridge Road",1.2829823631341002,103.8459241052}, {"J8 Hotel","8 Townshend Road",1.30769757417014,103.858520503628}, {"Jade Hotel","18 Jalan Molek",1.31171183499878,103.882775884854}, {"Jayleen 1918 Hotel","42 Carpenter Street",1.28778718510996,103.847932682565}, {"Jayleen Clarke Quay Hotel","25 New Bridge Road",1.2887152603363201,103.847502571539}, {"Jinshan Hotel","20 Trengganu Street",1.28285933622086,103.843899636084}, {"Joyfor Singapore","135 Geylang Road",1.3111830228142098,103.873960001985}, {"Just Inn Pine","153A Tyrwhitt Road",1.31190916003273,103.860208874601}, {"Jw Marriott Hotel Singapore South Beach","30 Beach Road",1.294652912042,103.85551605153401}, {"Kam Leng Hotel","383 Jalan Besar",1.31322433049363,103.85969951434299}, {"Kawan Hostel","24 Dunlop Street",1.3046501600773501,103.854088381462}, {"Klapstar Boutique Hotel","15 Hoe Chiang Road Tower Fifteen",1.2737717948526999,103.842089340381}, {"Lai Ming Hotel","432 Geylang Road",1.3130190974695,103.88313063532401}, {"Lai Ming Hotel Cosmoland","424 Geylang Road",1.31285244535505,103.882877759604}, {"Link Hotel","50 Tiong Bahru Road",1.2848724046662299,103.834290660889}, {"Lloyd's Inn","2 Lloyd Road",1.29726359726128,103.840365854794}, {"M Hotel Singapore","81 Anson Road",1.27368786424159,103.84505826319099}, {"M Social Singapore","90 Robertson Quay",1.29086700170988,103.837220920238}, {"Malacca Hotel","97 Still Road",1.31352191764296,103.906356986277}, {"Marina Mandarin","6 Raffles Boulevard Marina Square",1.29145526810891,103.857007335616}, {"Ibis Singapore Novena","6 Irrawaddy Road",1.32614786446487,103.845545053468}, {"Ibis Singapore On Bencoolen","170 Bencoolen Street",1.30096317872143,103.852422679232}, {"Jamilla Boutique Inn","10 Aliwal Street 5Footway.Inn Project Bugis",1.3020239202710902,103.861412048808}, {"K2 Guesthouse","15 South Buona Vista Road",1.28061089277287,103.78641410469601}, {"Le Meridien Singapore"," Sentosa 23 Beach View",1.2532936637246899,103.819557565235}, {"Mandarin Orchard Singapore","333 Orchard Road",1.30206451448631,103.836340962719}, {"Marina Bay Sands Singapore","1 Bayfront Avenue",1.2823333645477502,103.85830838681}, {"Mercure Singapore Bugis","122 Middle Road Midlink Plaza",1.29963655010764,103.85308305029899}, {"New Cape Inn","3 Seng Poh Road Green World",1.2855643017724099,103.834075881348}, {"Nnv Hostel","57 Lavender Street Mercury Backpackers' Hostel",1.3099902585806202,103.86297959118099}, {"One Farrer Hotel","1 Farrer Park Station Road",1.31275668725119,103.853842197917}, {"Orchard Hotel Singapore","442 Orchard Road",1.30766861522346,103.828164400669}, {"Oxford Hotel","218 Queen Street",1.29801039522022,103.851819954907}, {"Park Hotel Alexandra","323 Alexandra Road Alexandra Central",1.2875799570169,103.805370082891}, {"Park Hotel Farrer Park","10 Farrer Park Station Road Farrer Square",1.31198098343925,103.85474815922899}, {"Parkroyal On Kitchener Road","181 Kitchener Road",1.3105302542582802,103.855657426054}, {"Pegasus Hotel","100 Turf Club Road",1.3342195983767,103.79589824237699}, {"Reddoorz @ Aljunied","34 Lorong 22 Geylang Lemon Grass Hotel",1.31116645977522,103.88186195223601}, {"Reddoorz Near Marine Parade Central","400 East Coast Road Garden Terrace Hotel",1.30869697274901,103.912040454706}, {"Six Senses Duxton","83 Duxton Road",1.27887034998529,103.843187862063}, {"St. Regis Hotel Singapore","29 Tanglin Road",1.30566165727421,103.826053477025}, {"Swissotel The Stamford","2 Stamford Road",1.29326863605873,103.853365181965}, {"The Capitol Kempinski Hotel Singapore","15 Stamford Road",1.2941621148154099,103.850710608389}, {"The Great Madras","28 Madras Street",1.30493595980336,103.853009973208}, {"The Pod","289 Beach Road",1.30105229667991,103.86054641098801}, {"The Scarlet Hotel","33 Erskine Road",1.28082634797128,103.84539952443501}, {"The Vagabond Club","39 Syed Alwi Road",1.30689059721301,103.85840165101601}, {"Travellers Loft @ Jalan Besar","290A Jalan Besar",1.31064625480961,103.858904449668}, {"Travellers Loft @ Lavender","292 Lavender Street",1.31469337032453,103.860129660306}, {"Venue Hotel","305 Joo Chiat Road",1.30957901721756,103.902428918272}, {"Vintage Inn@Clarke Quay","33 Hongkong Street",1.2874133261725902,103.84711267501999}, {"Vip Hotel","5 Balmoral Crescent",1.31564774607498,103.834573055479}, {"Yotel Singapore Orchard Road","366 Orchard Road",1.3063443078376598,103.831347091916}, {"Capsule Pod Boutique Hostel","38 Upper Cross Street",1.2841536825830702,103.844865981016}, {"Carlton City Hotel Singapore","1 Gopeng Street",1.2759584682726899,103.84369850009001}, {"Carlton Hotel","76 Bras Basah Road",1.29592645318996,103.85251890601299}, {"Central 65 Hostel & Cafe","134 Jalan Besar",1.30668625269643,103.856400964231}, {"Champion Hotel","60 Joo Chiat Road",1.3147339810843301,103.898375889221}, {"Champion Hotel City","37 North Canal Road",1.28705722532944,103.84710191488399}, {"Chang Ziang Hotel","15 Lorong 15 Geylang",1.31316366542703,103.87804998119199}, {"Changi Cove","351 Cranwell Road",1.3885751478916202,103.975654978501}, {"Cherryloft Resorts","159 Jalan Loyang Besar",1.37916855087315,103.95831757278299}, {"City Backpackers","18 Hongkong Street",1.2878040000156499,103.84728191007}, {"Citybackpackers @ Kallang","12A Lorong 1 Geylang",1.31113776278292,103.872564087804}, {"Classique Hotel","240 Jalan Besar",1.30943019664864,103.858162186149}, {"Concorde Hotel Singapore","100 Orchard Road",1.3006143805129098,103.84222805230499}, {"Copthorne King Hotel Singapore","403 Havelock Road",1.28825960735914,103.83664249496701}, {"Courtyard By Marriott Singapore Novena","99 Irrawaddy Road Royal Square At Novena",1.32052982195736,103.843158861024}, {"Coziee Lodge","77A Geylang Road",1.31077390216154,103.87287588480301}, {"Crockfords Tower","10 Sentosa Gateway",1.25593387203197,103.81927985813499}, {"Crowne Plaza Changi Airport","75 Airport Boulevard",1.3586803473496598,103.987947172552}, {"D' Kranji Farm Resort","10 Neo Tiew Lane 2",1.4192844038118202,103.71842842285801}, {"Darlene Hotel (Geylang)","32 Lorong 8 Geylang",1.3109009032779,103.876969976334}, {"Days Hotel Singapore At Zhongshan Park","1 Jalan Rajah",1.32697770873604,103.84736585448401}, {"Deluxe Hotel","37A Lorong 8 Geylang",1.31067429638088,103.877397289749}, {"Destination Singapore Beach Road","700 Beach Road 700 Beach",1.3023665597585,103.86416929948}, {"Diamond Hotel","25 Lorong 18 Geylang",1.3118604372223202,103.880838673845}, {"Eighteen By Three Cabins","3 Stanley Street",1.2798774585861399,103.847645119041}, {"Footprints Hostel","25A Perak Road",1.30549417401571,103.85406407909299}, {"Fortuna Hotel","2 Owen Road",1.31170733900807,103.854953215692}, {"Four Chain View Hotel","757 Geylang Road",1.3150246298463402,103.890924420622}, {"Four Points By Sheraton Singapore"," Riverview 382 Havelock Road",1.28937099949942,103.836603819591}, {"New Cathay Hotel (Geylang)","443A Geylang Road",1.31323581775545,103.881747213213}, {"New Orchid Hotel","347 Balestier Road",1.3242912953783001,103.85103943307301}, {"New Society Backpacker","259A Jalan Besar",1.31028613773603,103.85827848473}, {"Nostalgia Hotel","77 Tiong Bahru Road",1.2850946317136298,103.83355141971902}, {"Novotel Singapore Clarke Quay","177A River Valley Road",1.29151478613339,103.84458629887399}, {"Novotel Singapore On Stevens","28 Stevens Road",1.31385975303285,103.82852312055799}, {"Oasia Hotel Downtown","100 Peck Seah Street",1.27585065032191,103.84424485300501}, {"Oasia Hotel Novena","8 Sinaran Drive",1.32003005311931,103.84478238731701}, {"One15 Marina Club","11 Cove Drive",1.24659858065497,103.83834477695801}, {"Orchard Parade Hotel","1 Tanglin Road",1.30657517492624,103.82773943314301}, {"Orchid Hotel","1 Tras Link",1.27693675631645,103.843847225345}, {"Oxley Blossom Hotel","14 Lorong 10 Geylang",1.3112308451377501,103.87754128921699}, {"Oxley Hotel","44 Lorong 6 Geylang",1.30999413321789,103.87650226715}, {"Oxley Hotel 88","12 Lorong 10 Geylang",1.31128856670346,103.87751288350901}, {"Parc Sovereign Hotel","175 Albert Street",1.30359194823321,103.851186607587}, {"Parc Sovereign Hotel - Tyrwhitt","165 Tyrwhitt Road",1.3123171025233402,103.86063378943399}, {"Park 22 Hotel Little India","60 Kerbau Road",1.30761952526781,103.85072918358101}, {"Park Avenue Changi","2 Changi Business Park Avenue 1",1.3356968447181599,103.962987028243}, {"Park Avenue Rochester","31 Rochester Drive",1.30535121506496,103.788347379411}, {"Park Hotel Clarke Quay","1 Unity Street",1.29154596683523,103.84232742726999}, {"Park Regis Singapore","23 Merchant Road",1.28808356137798,103.844443329556}, {"Park View Hotel","81 Beach Road",1.2972061700332098,103.85649429968299}, {"Parkroyal On Beach Road","7500A Beach Road The Plaza",1.29945374675605,103.860070230762}, {"Parkroyal On Pickering","3 Upper Pickering Street",1.28563915201993,103.84629027412599}, {"Pasir Panjang Inn","404 Pasir Panjang Road",1.2920783374242601,103.770167550518}, {"Peninsula.Excelsior Hotel","5 Coleman Street",1.29194593050271,103.849820401336}, {"Penta Hotel","33 Birch Road",1.3111926086645902,103.853597873321}, {"Perak Hotel","12 Perak Road",1.3047775967012,103.85321295097}, {"Phil Inn","43 Dickson Road",1.30536817891773,103.85372361146901}, {"Porcelain Hotel","48 Mosque Street",1.2842397761686297,103.844285533897}, {"Quality Hotel Marlow","201 Balestier Road",1.3200518808339199,103.85251973618999}, {"Equarius Hotel","16 Sentosa Gateway",1.25767113068297,103.81689668512199}, {"Fairmont","80 Bras Basah Road",1.29407645474834,103.853331830795}, {"Festive Hotel","12 Sentosa Gateway",1.2560211020885301,103.8190267122}, {"Five Stones Hostel At Beach Road","285 Beach Road",1.30097779571595,103.860407501383}, {"The Amazing Inn","1 Lorong 14 Geylang",1.31219357298852,103.879175566485}, {"The Claremont","301 Serangoon Road",1.3113659104672601,103.85475980728201}, {"The Daulat","16 Madras Street",1.3047512716562,103.852855014709}, {"The Elizabeth","24 Mount Elizabeth",1.30802412974768,103.835712303485}, {"The Fragrance Hotel","219 Joo Chiat Road",1.3114966081531299,103.901247571002}, {"The Fullerton Bay Hotel","80 Collyer Quay",1.2839666776583702,103.853480204998}, {"The Fullerton Hotel","1 Fullerton Square",1.2861932387783401,103.85297035664401}, {"The Green Kiwi Backpacker Hostel","280A Lavender Street",1.31436251556147,103.86031595315399}, {"The Hive","624 Serangoon Road",1.31571665402536,103.858786332817}, {"The Inn At Temple Street","36 Temple Street",1.2832066206143402,103.84386847796999}, {"The Keong Saik Hotel","69 Keong Saik Road",1.28103905245651,103.841640169485}, {"The Pan Pacific Hotel Singapore","7 Raffles Boulevard",1.29237290594131,103.85880441241999}, {"The Quay Hotel","57 South Bridge Road Santa Grand Hotel Boat Quay",1.2870550868730402,103.84831294340599}, {"The Quincy Hotel","22 Mount Elizabeth",1.30775153790031,103.835748316124}, {"The Regent Singapore","1 Cuscaden Road",1.3046732281781799,103.824897366604}, {"The Ritz-Carlton"," Millenia Singapore 7 Raffles Avenue",1.29071831886856,103.860047271338}, {"The Seacare Hotel","52 Chin Swee Road",1.28771627862772,103.83984312585}, {"The Southbridge Hotel","210 South Bridge Road",1.28341895202626,103.84565681080099}, {"The Sultan","101 Jalan Sultan",1.3031659993418998,103.860975926976}, {"The Warehouse Hotel","320 Havelock Road",1.28920178884641,103.837472057283}, {"The Westin Singapore","12 Marina View Asia Square Tower 2",1.2783073032032,103.85079518200199}, {"Ascott Orchard Singapore","11 Cairnhill Road",1.30398869781553,103.837118390961}, {"Budgetone Hotel","10 Lorong 18 Geylang Budgetone Hotel",1.31221721597267,103.88042359314801}, {"Gay World Hotel","115 Geylang Road",1.31119516475466,103.87374140233901}, {"Golden Dragon Hotel","61 Westerhout Road",1.3112255967516397,103.88103663102}, {"Amrise Hotel","112 Sims Avenue",1.31392278307909,103.87787224897801}, {"Andaz Singapore","5 Fraser Street",1.2991629645211298,103.857859541054}, {"Ann Siang House","28 Ann Siang Road",1.28076134046132,103.84576537116502}, {"Aqueen - Jalan Besar Hotel","230 Jalan Besar",1.3092908598117399,103.858027581355}, {"Aqueen Heritage Hotel - Joo Chiat","51 Joo Chiat Road",1.3149641464869999,103.89860871301201}, {"Aqueen Heritage Hotel - Little India","22 Belilios Lane",1.3073654186187098,103.851868264309}, {"Aqueen Hotel - Balestier","387 Balestier Road",1.3252259902186,103.84991661564399}, {"Aqueen Hotel - Lavender","139 Lavender Street",1.31234470574654,103.861185778449}, {"Aqueen Hotel - Paya Lebar","33 Jalan Afifi",1.32208821081336,103.89161769035101}, {"Arcadia Hotel","32 Hamilton Road",1.31145980145026,103.861329479891}, {"Arianna Hotel","83 Syed Alwi Road",1.30898197329355,103.855916080998}, {"Ark Hostel","83B Geylang Road",1.31083993755469,103.872957813707}, {"Arton Hotel","176 Tyrwhitt Road",1.31200013655628,103.860855936107}, {"Ascott Singapore Raffles Place","2 Finlayson Green",1.2820845570276298,103.851544400122}, {"Asia Star Hotel","44 Rowell Road",1.30850306663151,103.854725510548}, {"Asphodel Inn","380 Race Course Road (Level 2)",1.3150328880743,103.85727155432899}, {"Atlas Quarters","3 Jalan Kubor (1St Storey)",1.3036688914168202,103.859267555297}, {"Backpacker Cozy Corner Guesthouse","490 North Bridge Road (Level 2)",1.29837020611617,103.855776391294}, {"Backpackers Inn Chinatown","30A Mosque Street",1.28355992200649,103.84540742191601}, {"Backpackers@Sg","111J King George's Avenue",1.3103315732873402,103.861714995016}, {"Balestier Hotel","471 Balestier Road",1.32633188213822,103.847825742663}, {"Bay Hotel Singapore","50 Telok Blangah Road",1.2663368074936299,103.823792222833}, {"Beach Hotel","95 Beach Road",1.29752156067586,103.85671480975701}, {"Beach Villas","20 Sentosa Gateway",1.25923773200294,103.816547853083}, {"Beary Best! Hostel","18 Upper Cross Street",1.28384556307266,103.845380896578}, {"Beary Nice Hostel","14 Upper Cross Street Backpacker's Inn Chinatown 3",1.28379360684789,103.845477806494}, {"Beds And Dreams Inn @ Chinatown 1","52 Temple Street",1.2833090537191498,103.843595196696}, {"Beds And Dreams Inn @ Clarke Quay","38A Hongkong Street",1.2873221306861,103.847321110774}, {"Betel Box Backpackers Hostel","200 Joo Chiat Road",1.31220269434173,103.900168102357}, {"Blanc Inn","151 Tyrwhitt Road",1.31180997083727,103.860152249674}, {"Bliss Hotel Singapore","62 Upper Cross Street",1.28445775968128,103.844304196593}, {"Bright Star Hotel","20 Lorong 17 Geylang",1.31351582912141,103.87886483170601}, {"Broadway Hotel","195 Serangoon Road",1.30917905458253,103.85322450945999}, {"Bunc Hostel","15 Upper Weld Road",1.30536577750945,103.85484056}, {"Cameron Hotel","393F Upper Changi Road",1.33674235002479,103.95497404718}, {"Capella Hotel","1 The Knolls",1.24948297135602,103.82437823269301}, {"Capri By Fraser Changi City","3 Changi Business Park Central 1 Changi City",1.33426555940198,103.96358377706999}, {"Urban Hostel","67A Lorong 27 Geylang",1.31612668127014,103.883723560446}, {"V Hotel Bencoolen","48 Bencoolen Street",1.29894387000203,103.850763168114}, {"V Hotel Lavender","70 Jellicoe Road",1.30780928918213,103.862525573464}, {"Value Hotel - Balestier","218 Balestier Road",1.32123983104363,103.853270529968}, {"Value Hotel - Nice","302 Balestier Road",1.3233449482730402,103.852504389911}, {"Value Hotel - Thomson","592 Balestier Road",1.32695574576321,103.842719934295}, {"Venue Hotel The Lily","238 Joo Chiat Road",1.31154781233133,103.90058235717}, {"Victoria Hotel","87 Victoria Street Victoria Hotel",1.2970998896812902,103.852442168411}, {"Village Hotel Albert Court","180 Albert Street",1.30390260987173,103.850716670033}, {"Village Hotel Bugis","390 Victoria Street",1.3019281320376999,103.857668957469}, {"Village Hotel Changi","1 Netheravon Road",1.39040211286007,103.98606107078399}, {"Village Hotel Katong","25 Marine Parade Road",1.30377937658052,103.902912251069}, {"W Singapore Sentosa Cove Hotel","21 Ocean Way",1.2461654944910299,103.8424281463}, {"Wanderlust Hotel","2 Dickson Road",1.3051213168771798,103.85462947581}, {"Wangz Hotel","231 Outram Road",1.28432211723545,103.835010046686}, {"Wink Hostel","8A Mosque Street",1.2839484211515502,103.844144228358}, {"Xy Hotel Bugis Singapore","11 Jalan Klapa The Ardennes",1.30420913731568,103.859686464959}, {"Yes Chinatown Pt. Hotel","68A Smith Street",1.28303983594751,103.843161500479}, {"York Hotel","21 Mount Elizabeth",1.30692539665985,103.835187498613}, {"7 Wonders Hostel","257 Jalan Besar",1.31019244317432,103.858155144537}, {"Traveller@Sg","111H King George's Avenue",1.3103315732873402,103.861714995016}, {"Yew Lian Hotel","549A Geylang Road",1.31400068921253,103.885504076564}, {"Clifden Hostel","12A Upper Dickson Road",1.3063517713771,103.852350566474}, {"Hawaii Hostel","169A Bencoolen Street",1.3015691361056698,103.85224414369101}, {"Holiday Inn Express Singapore Katong","88 East Coast Road Katong Square",1.3048533751859,103.90457422505}, {"Hoover Hotel","246 Balestier Road",1.32170318837901,103.85306962087299}, {"Hotel Indigo Singapore Katong","86 East Coast Road Katong Square",1.30511658824391,103.90429845337299}, {"Hotel Nuve Heritage","13 Purvis Street Adonis Hotel",1.2965140537511999,103.855342379221}, {"Sing Hoe Hotel","759 Mountbatten Road",1.30076129614576,103.891452437148}, {"Super 8 Hotel","8 Lorong 10 Geylang",1.31158587654794,103.87746016277399}, {"Mks Backpackers' Hostel","44 Cuff Road",1.3067967557159699,103.853524371901}, {"Hotel 81 - Chinatown","181 New Bridge Road",1.28456367435218,103.84409849527901}, {"Hotel 81 - Cosy","8 Jiak Chuan Road",1.27966690584601,103.841859438859}, {"Hotel 81 - Dickson","3 Dickson Road",1.30490447768116,103.854269340067}, {"Hotel 81 - Elegance","30 Foch Road",1.3123797906924901,103.860272234539}, {"Hotel 81 - Fuji","269 Balestier Road",1.32218491093382,103.852599960077}, {"Hotel 81 - Geylang","20 Lorong 16 Geylang",1.31178588914175,103.879565352276}, {"Hotel 81 - Gold","20 Lorong 20 Geylang",1.31195642916704,103.881122151675}, {"Hotel 81 - Heritage","71 Jalan Sultan Road",1.3027160688922501,103.861299883799}, {"Hotel 81 - Hollywood","61 Lorong 8 Geylang",1.31005585037378,103.877447757589}, {"Hotel 81 - Joy","11 Lorong 11 Geylang",1.3127880534521201,103.87680332004601}, {"Hotel 81 - Lavender","85 Lavender Street",1.3107578255451002,103.862351670103}, {"Hotel 81 - Lucky","23 Lorong 20 Geylang",1.31187964861444,103.88149789462099}, {"Hotel 81 - Orchid","21 Lorong 8 Geylang",1.3111911717211497,103.877277737892}, {"Hotel 81 - Osaka","1 Eng Hoon Street",1.2833648533286899,103.834966687055}, {"Hotel 81 - Palace","25 Lorong 16 Geylang",1.3117914125910701,103.880119080443}, {"Hotel 81 - Princess","21 Lorong 12 Geylang",1.3109890554337198,103.878632365632}, {"Hotel 81 - Rochor","5 Jalan Besar",1.30375425023466,103.853983379888}, {"Hotel 81 - Sakura","181 Joo Chiat Road",1.3122918771199399,103.90051037183201}, {"Hotel 81 - Selegie","161 Selegie Road",1.30328441077433,103.84988412775499}, {"Hotel 81 - Spring","22 Lorong 15 Geylang",1.31368276663625,103.878270052404}, {"Hotel 81 - Star","31 Lorong 18 Geylang",1.31160601829725,103.88086052265301}, {"Hotel 81 - Tristar","1 Onan Road",1.31568838683143,103.897420529723}, {"Quarters","12 Circular Road",1.2876727676195199,103.84898638884701}, {"Raffles Hotel Singapore","1 Beach Road",1.2950974169482399,103.85406834861901}, {"Raintr33 Hotel Singapore","33 Hendon Road",1.38859258064073,103.97793103567498}, {"Ramada Singapore At Zhongshan Park","16 Ah Hood Road",1.32710813623037,103.84637426419701}, {"Regin Hotel","56 Sims Avenue",1.3132564892844099,103.875894128162}, {"Relc International Hotel","30 Orange Grove Road",1.3128386188269099,103.826031940554}, {"Rendezvous Hotel Singapore","9 Bras Basah Road",1.29858298562987,103.849316103794}, {"River City Inn","33C Hongkong Street",1.2874133261725902,103.84711267501999}, {"Rm Hotel","10 Tuas West Drive",1.3415880020571,103.6350898307}, {"Robertson Quay Hotel","15 Merbau Road",1.2911685919498501,103.841985608927}, {"Royal India Hotel","88 Syed Alwi Road",1.3092288788003899,103.855672467916}, {"Royal Plaza","25 Scotts Road",1.3070893326421003,103.831445772516}, {"Rucksack Inn@Lavender","280 Lavender Street",1.31436251556147,103.86031595315399}, {"Sandpiper Hotel","63 Dunlop Street",1.30480932597676,103.85359577343}, {"Santa Grand Hotel Bugis","8 Jalan Kubor",1.3040533604853202,103.859429087316}, {"Santa Grand Hotel East Coast","171 East Coast Road",1.30672321401106,103.905795545506}, {"Santa Grand Hotel Little India","3 Veerasamy Road",1.30782191083669,103.85308998437701}, {"Santa Grand Hotel West Coast","428 Pasir Panjang Road",1.29233444778268,103.76858972195299}, {"Seng Wah Hotel","15 Lorong 22 Geylang",1.31231758818692,103.882411814553}, {"Shangri-La Hotel","22 Orange Grove Road",1.31124741104026,103.826756766906}, {"Shangri-La's Rasa Sentosa Resort & Spa","101 Siloso Road Sentosa",1.25780205878419,103.80979789072799}, {"Sheraton Towers Singapore Hotel","39 Scotts Road",1.31195054234203,103.836462155528}, {"Four Seasons Hotel","190 Orchard Boulevard",1.30521022631229,103.828652729967}, {"Fragrance Hotel - Bugis","33 Middle Road",1.2969208279052,103.855556159797}, {"Fragrance Hotel - Crystal","50 Lorong 18 Geylang",1.31057498834276,103.88058948571998}, {"Fragrance Hotel - Emerald","20 Lorong 6 Geylang",1.31100989103812,103.876341749836}, {"Fragrance Hotel - Imperial","28 Penhas Road",1.3096359857055901,103.86242538218599}, {"Fragrance Hotel - Lavender","51 Lavender Street",1.30978959616934,103.863070793279}, {"Fragrance Hotel - Ocean View","432 Pasir Panjang Road",1.2924137721209399,103.768512803871}, {"Fragrance Hotel - Pearl","21 Lorong 14 Geylang",1.31156076539458,103.87928937864099}, {"Fragrance Hotel - Riverside","20 Hongkong Street",1.2878963861508201,103.84714641242701}, {"Fragrance Hotel - Royal","400 Telok Blangah Road",1.26970677370305,103.813874985691}, {"Fragrance Hotel - Ruby","10 Lorong 20 Geylang",1.3122380885145801,103.88109709109501}, {"Fragrance Hotel - Selegie","183 Selegie Road",1.3037651986731202,103.849949305153}, {"Fragrance Hotel - Sunflower","10 Lorong 10 Geylang",1.3114258135288899,103.87748605075599}, {"Fragrance Hotel - Viva","75 Wishart Road",1.26988808241198,103.813969786008}, {"Fragrance Hotel - Waterfront","418 Pasir Panjang Road",1.29220893779978,103.76888827189899}, {"Furama City Centre Singapore","60 Eu Tong Sen Street",1.28647356697447,103.84458855364599}, {"Furama Riverfront Singapore","405 Havelock Road",1.28763454808621,103.83609283796899}, {"G4 Station Backpackers Hostel","11 Mackenzie Road",1.3043685531175901,103.849907648899}, {"Genting Hotel Jurong","2 Town Hall Link",1.33156163893178,103.739259626277}, {"Golden Royal Hotel","51 Desker Road",1.3091420716751598,103.855250936627}, {"Golden Star Hotel","31 Lorong 8 Geylang",1.31076955416731,103.87733635184999}, {"Goodwood Park Hotel","22 Scotts Road",1.3082221504661,103.834109066833}, {"Grand Copthorne Waterfront Hotel Singapore","392 Havelock Road",1.2902819423791498,103.83514795514799}, {"Grand Hyatt Singapore","10 Scotts Road",1.3063453396029499,103.833283327381}, {"Grand Mercure Roxy Hotel","50 East Coast Road",1.30432600922246,103.904051127141}, {"Grand Park City Hall","10 Coleman Street",1.2926289491276102,103.850123934253}, {"Grand Park Orchard","270 Orchard Road",1.30310526758961,103.83620201457899}, {"Gusti Bed And Breakfast","30A Penhas Road",1.30972859322065,103.862220295883}, {"Haising Hotel","33A Jalan Besar",1.30462080568994,103.85458069220199}, {"Hangout @ Mt. Emily","10A Upper Wilkie Road",1.30336628108967,103.847846568816}, {"Harbour Ville Hotel","512 Kampong Bahru Road",1.27261403837772,103.82774470710899}, {"Hard Rock Hotel","28 Sentosa Gateway",1.2574658382451498,103.818913906453}, {"Heritage Hostel","293 South Bridge Road",1.2813793788393202,103.845019491978}, {"Hilton Singapore","581 Orchard Road",1.30587902781428,103.829314890548}, {"Holiday Inn Express Singapore Clarke Quay","2 Magazine Road",1.2892440375094099,103.841983932037}, {"Holiday Inn Express Singapore Orchard Road","20 Bideford Road",1.30322797301759,103.836680366546}, {"Holiday Inn Singapore Atrium","317 Outram Road",1.28907019979956,103.834068286993}, {"Holiday Inn Singapore Orchard City Centre","11 Cavenagh Road",1.3022791353319498,103.841101585399}, {"Home Suite View Hotel","12 Lorong 12 Geylang",1.3114008643233301,103.87812122906601}, {"Hornbill Hotel","9 Lorong 10 Geylang New Happy Hotel",1.31159152451666,103.877803633174}, {"Hotel 165","165 Kitchener Road",1.3104789331927,103.856274001605}, {"Hotel 1929","50 Keong Saik Road",1.28079216840282,103.84181229447701}, {"Hotel 81 - Balestier","226 Balestier Road",1.3213796307123502,103.85312373724301}, {"Hotel 81 - Bugis","31 Middle Road",1.29687854739577,103.855618628892}, {"Hotel 81 - Changi","428 Changi Road",1.3186911662789198,103.911729073637}, {"Hotel 81 - Cherry","3 Lorong 12 Geylang",1.3119912145122201,103.878417372557}, {"30 Bencoolen","30 Bencoolen Street",1.29850073012538,103.85040227728202}, {"5Footway.Inn Project Boat Quay","76 Boat Quay",1.28820208925703,103.849195852726}, {"60's Hostel","569 Serangoon Road",1.3155923230634998,103.85814411147699}, {"85 Beach Garden Hotel","85 Beach Road",1.2973032782134999,103.856569913941}, {"Abc Premium Hostel","91A Owen Road",1.31327444740633,103.85310638250401}, {"Adamson Lodge","6 Perak Road",1.30448417210085,103.852965178051}, {"Aliwal Park Hotel","77 Aliwal Street",1.30336026368742,103.860268081432}, {"Amara Sanctuary Resort","Sentosa 1 Larkhill Road",1.25212800501101,103.82201659011601}, {"Amara Singapore","165 Tanjong Pagar Road",1.27492766283486,103.84354953663099}, {"Amaris By Santika","21 Middle Road",1.2967145804970102,103.855837762519}, {"Amber Hotel","42 Amber Road",1.3009201123621599,103.901244741483}, {"Amber Hotel Katong","40 Amber Road",1.30086113760875,103.90098679827801}, {"Marrison @ Desker","65 Desker Road",1.30899646676322,103.85549965169001}, {"Marrison Hotel","103 Beach Road",1.29789093682093,103.85708753287399}, {"Mayo Inn","9 Jalan Besar",1.30392258754703,103.854120530881}, {"Meadows Hostel","7A Hamilton Road",1.31139115024947,103.86067717931299}, {"Mercure Singapore On Stevens","28 Stevens Road",1.31385975303285,103.82852312055799}, {"Meriton Hotel","43A Jalan Besar",1.30474092907109,103.85465935018499}, {"Min Wah Hotel","19 Lorong 22 Geylang",1.31219950435272,103.88246127737499}, {"Mitraa Inn","531 Serangoon Road",1.3150748231745502,103.85776475281}, {"Moni Gallery Hostel","263 Lavender Street",1.31544175856,103.85898898190399}, {"Moon 23 Hotel","23 Dickson Road",1.3050839661056002,103.854044368806}, {"Mori Hostel","429 Race Course Road",1.3159483995090502,103.85758920249}, {"Naumi","41 Seah Street",1.29586809995794,103.855181690707}, {"South East Asia Hotel","190 Waterloo Street",1.3010867998550601,103.853135269751}, {"Strand Hotel","25 Bencoolen Street",1.2986534618641599,103.849738238646}, {"Studio M Hotel","3 Nanson Road",1.2907775456371298,103.839076190494}, {"Summer View Hotel","173 Bencoolen Street",1.3016591701873899,103.852237532864}, {"Superb Hostel","2 Jalan Pinang",1.3027942236308,103.858531869073}, {"Swissotel Merchant Court","20 Merchant Road",1.28821803012434,103.84569230910601}, {"Tai Hoe Hotel","163 Kitchener Road",1.31026599060107,103.85656502158301}, {"Taipei Hotel (2000)","60 Lorong 8 Geylang",1.30992261319892,103.87708165614401}, {"Pan Pacific Serviced Suites Beach Road","7500B Beach Road",1.29962023770283,103.86064727437599}, {"Beds And Dreams Inn @ Chinatown 2","52A Temple Street",1.2833090537191498,103.843595196696}, {"Cube @ Smith Street","76A Smith Street",1.28316148176375,103.84300596921801}, {"Five/6 Hotel Splendour","5 Lorong 6 Geylang",1.31091001420541,103.876690706681}, {"Hotel Mono","18 Mosque Street",1.2838526731754099,103.844389451917}, {"Lodge 41","41 Lorong 16 Geylang",1.3115228518365,103.880204174317}, {"Mandarin Oriental","5 Raffles Avenue Marina Square",1.29066059642303,103.858323978407}, {"The Noble Hotel","407 Jalan Besar The Noble Hotel",1.31379682322667,103.85977593931}, {"Villa Samadhi Singapore","20 Labrador Villa Road",1.26893769177626,103.800885639165}, {"Hup Hoe Hotel","586A Geylang Road",1.31396448904303,103.887584335816}, {"Jin Dong Hotel","33 Lorong 12 Geylang",1.3102272662934198,103.878806736819}, {"Kim Tian (Star) Hotel","4 Lorong 6 Geylang",1.3114355418732,103.876240341489}, {"Kim Tian Hotel","21 Lorong 22 Geylang",1.3120575942575199,103.88245872901699}, {"Kim Tian Hotel (Han)","29 Lorong 4 Geylang",1.3101616366428999,103.876202657152}, {"La Mode (Sophia)","17 Lorong 10 Geylang",1.3112646139653201,103.877802901377}, {"Lex Hotel (Lorong 8)","1 Lorong 8 Geylang",1.3118105494215,103.87716439135401}, {"Coo","259 Outram Road The Plot Hostels",1.28500520773834,103.834726683638}, {"Al Asia Hotel","488 Geylang Road",1.31324105208672,103.884680934793} }; // Find nearest hotel to your current latitude longitude (no interface provided here) double current_latitude = 1.29739, current_longitude = 103.84089, distance_to_nearest_hotel = 999999, measured_distance = -1; Point current_point = {current_latitude, current_longitude}, hotel_point; string nearest_hotel_name, nearest_hotel_address; for(const Hotel& hotel : singapore_hotels) { hotel_point = {hotel.latitude, hotel.longitude}; measured_distance = dist(current_point, hotel_point); if(measured_distance < distance_to_nearest_hotel) { nearest_hotel_name = hotel.hotel_name; nearest_hotel_address = hotel.street_address; distance_to_nearest_hotel = measured_distance; } } cout << "The nearest hotel is: " + nearest_hotel_name << endl << "It's address is: " + nearest_hotel_address << endl; /* The nearest hotel is: Lloyd's Inn It's address is: 2 Lloyd Road */ return 0; }