latex
This commit is contained in:
15
vscode/code/mcmthesis-matlab1.m
Executable file
15
vscode/code/mcmthesis-matlab1.m
Executable file
@@ -0,0 +1,15 @@
|
||||
function [t,seat,aisle]=OI6Sim(n,target,seated)
|
||||
pab=rand(1,n);
|
||||
for i=1:n
|
||||
if pab(i)<0.4
|
||||
aisleTime(i)=0;
|
||||
else
|
||||
aisleTime(i)=trirnd(3.2,7.1,38.7);
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
41
vscode/code/mcmthesis-sudoku.cpp
Executable file
41
vscode/code/mcmthesis-sudoku.cpp
Executable file
@@ -0,0 +1,41 @@
|
||||
//============================================================================
|
||||
// Name : Sudoku.cpp
|
||||
// Author : wzlf11
|
||||
// Version : a.0
|
||||
// Copyright : Your copyright notice
|
||||
// Description : Sudoku in C++.
|
||||
//============================================================================
|
||||
|
||||
#include <iostream>
|
||||
#include <cstdlib>
|
||||
#include <ctime>
|
||||
|
||||
using namespace std;
|
||||
|
||||
int table[9][9];
|
||||
|
||||
int main() {
|
||||
|
||||
for(int i = 0; i < 9; i++){
|
||||
table[0][i] = i + 1;
|
||||
}
|
||||
|
||||
srand((unsigned int)time(NULL));
|
||||
|
||||
shuffle((int *)&table[0], 9);
|
||||
|
||||
while(!put_line(1))
|
||||
{
|
||||
shuffle((int *)&table[0], 9);
|
||||
}
|
||||
|
||||
for(int x = 0; x < 9; x++){
|
||||
for(int y = 0; y < 9; y++){
|
||||
cout << table[x][y] << " ";
|
||||
}
|
||||
|
||||
cout << endl;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
Reference in New Issue
Block a user