Summary Files Commits Branches @commit @diff @stats
path: root / Year 4 / Artificial Intelligence / ENDME / src / main.rs
diff options
context:
space:
mode:
Commite38341caa4b4e85de82b8dde7973b4f6c5df90a3 (patch)
Author
 Syndamia <kamen@syndamia.com>
2024-11-17 21:36:51 +0200
Committer
 Syndamia <kamen@syndamia.com>
2024-11-17 21:36:51 +0200
Files4e9dc27726ddee8fbbabf90610181351e7982638 /Year 4/Artificial Intelligence/ENDME/src/main.rs
uni-projects-e38341caa4b4e85de82b8dde7973b4f6c5df90a3.tar
uni-projects-e38341caa4b4e85de82b8dde7973b4f6c5df90a3.tar.gz
uni-projects-e38341caa4b4e85de82b8dde7973b4f6c5df90a3.zip
Parent5327c94aad5f490d93331887793b89b593b17f18 (diff)
hw(1/AI): Add failed attemt at implementing it in Rust
1 files changed, 27 insertions, 0 deletions
-rw-r--r--Year 4/Artificial Intelligence/ENDME/src/main.rs27
diff --git a/Year 4/Artificial Intelligence/ENDME/src/main.rs b/Year 4/Artificial Intelligence/ENDME/src/main.rs
new file mode 100644
index 0000000..58a7196
--- /dev/null
+++ b/Year 4/Artificial Intelligence/ENDME/src/main.rs
@@ -0,0 +1,27 @@
+use text_io::read;
+mod graph;
+use graph::{ Graph };
+
+// Manhattan
+fn h() {
+}
+
+fn dfs() {
+}
+
+fn main() {
+ /* Input */
+ let N: u32 = read!();
+ let I: i32 = read!();
+
+ let size: usize = (N as f64 + 1.0).sqrt() as usize;
+ let mut board: Vec<Vec<u32>> = Vec::new();
+ for i in 0..size {
+ board.push(Vec::new());
+ for j in 0..size {
+ board[i].push(read!());
+ }
+ }
+
+ let G: Graph = Graph::new(board, I as u32);
+}