Za ingeed ene entry-g unshjiiga anddaa unshjiiga udriin mend hurgii. Coder.mn deer devshigdsn bodloguudas 40-s baga hun bodsn bodloguudaas uuriin bodoj chadsn bodloguudiin sanaag bichiheer shiidlee. 1. Shine jil Brute force. 2. Tovchluuruud Brute force. Pointer ashiglah esuul erembleh zereg arga hereglen hurdn bodh bolomj bga bh. Brute force hiigd tentschihsn bolhoor ter chiger n orhitsn 3. XIEX Tom toonii uildel bugdeere medjiiga bh gej naidjiina :D. Hervee medku bol endees uzej bolno. tegeed Eucled-n XIEX oldg algorithm-g ashiglaad bodno. Hervee medku bol ene esuul ene bodlogo deer bichsn argiig unshaad bodooroi. dajgui sain oilgono gej naidjiina. 4. Banknii dans Ene bodlogiig yagad 37hon hun bodsn bgag n sain oilgosngui. Magadgui nariivchlaliin aldaa l gargasn bh. Tiim aldaa garghgui tuld deposit, PROFIT 2-g 100 ch ymuu 1000 ch ymuu toogoor urjuulj bolno. 5.Sudoku 9X9 nvd bolhoor medeej brute force. Mur, bagana, 3X3 buyu niit 9 nudnd 1-9 hurtelh too bairlh uchir buh tohioldoliig shalgaad bodoj bolno. Sonirholtoi bsn shv kk 6.Tsuvaa 1-15 hurtelh toog 0001 0010 .... 1111 16-255 hurtelh toog 00010000 00010001 .... 11111111 ... ... ... geh metchilengeer gargana. 1 ugeer helber ter too 2iin 4*(n-1) zeregtees ih, 4*n zeregtees baga bvl 4*n orontoi bn. Toog 2tiin toolol ruu shiljuuleh, jishee: 15=1*2^3+1*2^2+1*2^1+1*2^0 uurur helbel 15= 15%2+(15/2)%2+(15/4)%2+(15/8)%2. Orolt n toonuudiin too 1000-s hetrehgui gsn tul C deer, while(scanf("%d",&n)!=EOF){}, C++ deer, while((cin>>n)!=EOF){} paskal medku Tegeed jaahn tootsood l bolchino. 7.Ded palindrom Bas l brute force.hyzgaar n 10000 bolhoor barag l 0 ms. Palindrom hervee medku bol ene bodlogiig bodoj uzerei. N urttai mur ugugdsn gej uzvl, for(int i=0;i<N-1;i++){ for(int j=N-1;j>=i;j---){ palindrom esehiig shalgaad ... } } ingeel garsn hariuga hevleel boloo 8.Фибаночийн тооны цифрүүдийн нийлбэр Tom toonii uildel ashiglaad fibanochiin toogoo olood, ter massiviinha buh toog nemeed dugaartaiga tentsuu bn uu gedgiig n shalgana. Hevleel boloo :p. Oilgomjgui tailbarlasn bh bas tom toonii uildelee sain surna bh ged uurinhu bodoltiig end sharelchlee. Tataj avaad sonirhno biz ps: Kirilleer bicheegui sooo Sorry.
|