Urrghh I need a minute!!!
Ya itulah yang ada di pikiran gw pas ngerjain USACO Elite March 2010 Bronze Division. Secara mengejutkan, ternyata ada 4 soal di kontes yang kali ini. Biasanya berisi 3 nomor. Gw ngerjain seperti biasa, baca dulu smua soal, terus mulai ngerjain yang paling dirasa bisa. Well, akhirnya gw ngerjain nomor 4, trus nomor 1, nomor 2, dan yang terakhir nomor 3.
Nomor 3 ini udah ga asing lagi, khususnya bagi anak Sanur yang seangkatan gw :). Soal 3 : Togel. Yap, itulah task-nya. Secara umum permainan togel itu dimainin sama 2 orang, masing-masing mengambil angka secara acak dari 1000-9999 (versi 4 digit). Lalu bergantian menebak angka punya lawan. Yang berhasil duluan, dia menang. Nah, untuk feedback penebakan (klo ga ada feedback sampe bejenggot juga ga beres ni game), si orang yang angkanya ditebak harus bilang antara strike dan ball.
- Strike : angka yang ditebak benar dan posisinya juga pas.
- Ball : angka yang ditebak benar tapi posisi masih salah.
So, kalau kita punya angka 1789 dan ditebak 7189, kita harus feedback 2 strike (8 dan 9) dan 2 ball (1 dan 7).
Nah, program kali ini bakalan nge-input hasil-hasil penebakan beserta feedbacknya. Kita, si programmer, bertugas untuk nyari bilangan TERKECIL yang memenuhi seluruh tebakan dan feedback dari input.
Awalnya gw bingung banget harus gimana -_-“. Dan sampe akhir pun, jujur, masih bingung. Tapi karena kepepet, mulailah dengan cara brute force, yaitu cara yang dipake pemain biasa (non-komputer) saat bermain –> waktu tinggal 30 menit.
Sambil ngerjain udah ngebut-ngebutan. Eeeeh gitu program beres, ada nge-bug. Dan gw lamaaaaaa banget ga bisa nemuin bug-nya itu dimana. Gw udah nyanyi-nyanyi stres gara2 ga bisa dan akhirnya di 2 menit terakhir, I found where the bug was :D. Cepet2 gw ganti, gw pasangin assign dsb. dan compile terakhir kali untuk mastiin udah bener smua itu. Sialnya, begitu gw compile dengan test case yang gw punya (luckily I often play ‘togel’ dan masih ada kertas bekas mainnya), ternyata outputnya SALAH. Gw bener2 stres dan tiba-tiba ketemu bug tolol yang ternyata sebuah pernyataan yang lupa gw NOL-in. Begitu gw NOL-in, program lancar.
Gw submit nih.
But, ow man…
“CONTEST TIME HAS ENDED”
AAAAAAAAAARRRRRRRRGHHHHHHH!!!!!!!
Dan gitu gw liat lagi jam gw…
I was late for 1 minute…
……………………………………………………………………………………………..
Okelah memang gw ga tau pasti program gw 100% bener ato ga (secara program gw itu kaya kebon serangga, bug-nya banyak banget –> indikasi gila)…tapi kan…setidaknya klo gw sempet submit, adalah 10-20 poin gw dapet.
Hhhh…but still…I was late…
Ini bener-bener kontes yang ngebuat gw gedeg. NOOOOO!!!!!! x(
Betway Casino Hotel, Lively - MapyRO
ReplyDeleteBetway Casino Hotel, Lively in Lively, United States Located in Lively, this is an easy drive from Lively 파주 출장마사지 Casino Hotel. Free Wi-Fi 영천 출장안마 in all areas 공주 출장마사지 Rating: 평택 출장마사지 2.8 · 14 votes · 거제 출장마사지 Price range: $32
From the market Direct CNC leaders in automotive to entertainment, BigRep’s partners are a few of the the} leading industrial players in automotive, machining, aerospace and industrial manufacturing. They work together to develop probably the most superior, progressive, and but unseen purposes and technological options in the additive manufacturing domain. Performing an admirable job throughout three distinct functions, the Snapmaker is a maker’s dream tool for small-scale work. There are higher individual instruments that cost lower than the Snapmaker’s $799, however few, if any, that challenge it for 3D printing, laser engraving and CNC carving multi functional. The Snapmaker is a hybrid 3D printer, laser etcher, and CNC cutter multi functional machine.
ReplyDeleteThe annual cardroom license fee for each facility shall be $1,000 for each table to be operated at the cardroom. The license 1xbet korea fee shall be deposited by the commission with the Chief Financial Officer to the credit score of the Pari-mutuel Wagering Trust Fund. “Authorized game” means a game or collection of video games of poker or dominoes which are played in a nonbanking method. A particular person could not obtain any consideration or commission for allowing a penny-ante game to happen in his or her dwelling. Charitable, nonprofit organizations; drawings by likelihood; required disclosures; illegal acts and practices; penalties. Older elementary kids may be be} thinking about studying about gambling, including their long-term possibilities of successful.
ReplyDelete