• 検索結果がありません。

隴陋サ譏エ?騾ケ?隰br/>

N/A
N/A
Protected

Academic year: 2021

シェア "隴陋サ譏エ?騾ケ?隰br/>"

Copied!
2
0
0

読み込み中.... (全文を見る)

全文

(1)

1

最初

乱数で、石をどこに置くかを決めます。

1.1

最初のプログラム

/* ci2.c 最初の着手 */ #include <stdio.h> #include <stdlib.h> #include <time.h> #define B_SIZE 9

#define WIDTH 11 // B_SIZE + 2 #define BOARD_MAX 81

int get_z(int x, int y);

int board[121] = { 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3 }; int main() { int r; int x,y; 1

(2)

char *str[3] = {"・", "●", "○"}; srand((unsigned)time(NULL)); r = rand() % 121; while(r == 0 || r <= 11 || r > 109 || r % 11 == 0 || r % 11 == 10){ r = rand() % 121; } board[r] = 1; printf(" \n "); for(x = 0; x < B_SIZE; x++){ printf("%d ", x+1); } printf("\n");

for(y = 0; y < B_SIZE; y++){ printf("%d ", y+1); for(x = 0; x < B_SIZE; x++){ printf("%s", str[board[get_z(x,y)]]); } printf("\n"); } return 0; }

int get_z(int x, int y) {

return (y + 1) * WIDTH + (x + 1); //0<= x <= 8, 0<= y <= 8 }

参照

関連したドキュメント

There is a bijection between left cosets of S n in the affine group and certain types of partitions (see Bjorner and Brenti (1996) and Eriksson and Eriksson (1998)).. In B-B,

We establish sharp Br´ezis-Gallou¨et-Wainger type inequalities in Besov and Triebel-Lizorkin spaces as well as fractional Sobolev spaces on a bounded domain Ω ⊂ R n.. We treat

(The Elliott-Halberstam conjecture does allow one to take B = 2 in (1.39), and therefore leads to small improve- ments in Huxley’s results, which for r ≥ 2 are weaker than the result

[r]

“Breuil-M´ezard conjecture and modularity lifting for potentially semistable deformations after

lines. Notice that Theorem 4 can be reformulated so as to give the mean harmonic stability of the configuration rather than that of the separate foliations. To this end it is

S., Oxford Advanced Learner's Dictionary of Current English, Oxford University Press, Oxford

At the end of the section, we will be in the position to present the main result of this work: a representation of the inverse of T under certain conditions on the H¨older