... style="font-family: Courier New;">เกมประกอบด้วยบอร์ดและบล็อก กำหนดให้บอร์ดมีขนาดไม่เกิน 5 x 5 และบล็อกมีไม่เกิน 3 ชนิด โดยบล็อกเท่านั้นที่สามารถเคลื่อนย้ายได้ โดยย้ายไปทางด้านซ้ายหรือด้านขวาเท่านั้นหากมีที่ว่าง ส่วนบอร์ดไม่สามารถเค�...
... found a very unusual game board in his attic. Surprisingly, it consists of R·C square cells. The
rows are numbered 0 to R−1 top to bottom and the columns 0 to C−1 left to right.
What makes the board unusual is the way in which the cells are coloured. Each cell is either grey or
white:
· White, if the row and column numbers of the cell, when represented in binary, have at least one
digit 1 in the same position. For example, the cell (4, 5) would be white.
· Grey, otherwise. For example, the cell (2, 5) would be grey.
... ช่วยกันเอามาลงหน่อยนะครับ ผมมี 3 ข้อเอง ที่น่าสนใจ(มากๆ) ลองฝึกทำกันเล่นๆนะครับ ก่อนที่จะมีโจทย์เพิ่มเติมจากคนทำเว็ปไซต์อ่ะครับ ผมเห็นว่า โจทย์พวกนี้ น่าจะไม่มีคำตอบที่ดีที่สุด เลยเอามาให้ลองทำเล่นๆดูครับ ( ข้�...
... ไม่ผ่านเคส 8 เคสเดียว ได้ลองหาดูใน forum แล้วเห็นว่ามีคนมีเทสเคสของข้อนี้อยู่ ยังไงขอความกรุณาด้วยนะครับ เอาแค่เคสมาเฉยๆ ก็ได้ครับ ไม่ต้องให้ output เดี๋ยวผมเอาไปลองเอง ขอบคุณมากนะครับ...
... Block ติดกัน 3 อัน จะทำอะไรหรอครับ # A A # # # A # # # # # จะได้ทีเดียว 15 คะแนนเลยรึป่าวครับ หรือจะลบเหลือ # - - # # # A # # # # # หรือ # A - # # # - # # # # # ช่วยตอบทีครับ ขอบคุณมากครับ...
... char game; int x,y,N,M,mj = {0}; //input scanf("%d %d",&N,&M); for(x=0;x<N;x++) { scanf("%s",game); } for(x=0;x<M;x++) { scanf("%d",&mj); } //start game for(x=0;x<M;x++) { for(y=0;y<N;y++) { if(mj > 0) { if(game == '#') { game = '#'; ...
... ผมคิดว่าเป็นหนังสือที่ดีมากครับ เป็น text นะครับ การเขียนโปรแกรมภาษา c++ เล่ม 1( thinking in c++ vol 1) http://www.ziddu.com/download/4963341/Thinking_in_c_plus_plus_vol_1.pdf.html การเขียนโปรแกรม ภาษา c++ เล่ม 2( thinking in c++ vol 2) http://www.ziddu.com/download/4963409/Thinking_in_c_plus_plus_vol_2.pdf.html การเขียนโปรแกรมกับ Direct X 9.0 http://www.ziddu.com/download/4963483/Ga...
... declaration char sms; long i, j, count=0, min, fail, repeatmin, score={0}, win, max, stopgame=0; //input and process do { scanf("%s", sms); if (sms=='!') break; i=0; while (sms!='\0') { if (score]>=0) score]++; i++; } if (stopgame==6) break; ///find min min=score; for (j=66; j<=71; j++) { if (score<min && score>=0) { min=score; ...
... P--P------ #include <stdio.h> char data,tmp; int i,j; int m,n; void walk(int x,int y) { char tmp; int a; tmp=data; data='-'; while ((data=='-')&&(i<m-1)) {x++;} //if (x==m-1) data='-'; //else data=tmp; if (tmp==data) { data='-'; data='-'; for (a=x-1;a>=0;a--) { if ((data!='-')&&(data!='#')) walk(a,y); if ((data!='-')&&(data!='#')) walk(a,y+1); } } if (tmp==data) { data='-'; data='-'; for (a=x-1;a>=0;a--) ...
... main() { char name, con; int input, total, score, count, random, gameplayed; float average; printf("Please enter your name (QUIT - to quit): "); scanf("%s",name); while(strcmp(name,"QUIT")!=0) { total = 0; gameplayed = 0; do { gameplayed++; srand(time(0)); random=rand()%100+1; score=100; count=0; do { count++; printf("Guess the Winning Number 1-100(Guess: %d), %s : ",count,name); scanf("%d",&input); if(input>=1&&input<=100) { if(random==input) ...