摘要: import torch import torch.nn as nn import torch.optim as optim from torch.utils.data import Dataset, DataLoader from torchvision import transforms fro 阅读全文
posted @ 2025-11-16 19:48 ouyeye 阅读(6) 评论(0) 推荐(0)
摘要: #include <iostream> #include <vector> #include <string> using namespace std; // 三元组结构体 struct Triple { int row, col; // 行号、列号(从0开始) int val; // 非零元素值 阅读全文
posted @ 2025-11-05 14:27 ouyeye 阅读(13) 评论(0) 推荐(0)
摘要: #include <iostream> #include <string> using namespace std; // 构建KMP的next数组 void getNext(const string& t, int next[]) { int len = t.size(); next[0] = - 阅读全文
posted @ 2025-11-05 13:47 ouyeye 阅读(6) 评论(0) 推荐(0)
摘要: #include <iostream> #include <string> using namespace std; // 简单模式匹配,判断从主串s的pos位置开始,是否有与子串sub匹配的子串 bool simpleMatch(const string& s, const string& sub 阅读全文
posted @ 2025-11-05 13:44 ouyeye 阅读(8) 评论(0) 推荐(0)
摘要: #include <iostream> #include <string> using namespace std; string plain = "abcdefghijklmnopqrstuvwxyz"; string cipher = "ngzqtcomuhelkpdawxfyivrsj"; / 阅读全文
posted @ 2025-11-05 13:35 ouyeye 阅读(8) 评论(0) 推荐(0)
摘要: #include <iostream> #include <stack> #include <vector> #include <climits> using namespace std; // 迷宫大小 const int ROW = 5; const int COL = 5; // 迷宫(0:可 阅读全文
posted @ 2025-10-22 14:01 ouyeye 阅读(7) 评论(0) 推荐(0)
摘要: #include <iostream> using namespace std; typedef char ElemType; // 链队的节点结构 typedef struct QNode { ElemType data; // 节点存储的元素 struct QNode *next; // 指向下 阅读全文
posted @ 2025-10-22 14:01 ouyeye 阅读(3) 评论(0) 推荐(0)
摘要: #include <iostream> using namespace std; #define MAXSIZE 6 // 环形队列最大容量(实际可用容量为MAXSIZE-1,避免空满判定冲突) typedef char ElemType; // 环形队列的结构体 typedef struct { 阅读全文
posted @ 2025-10-22 14:00 ouyeye 阅读(5) 评论(0) 推荐(0)
摘要: import torch import torch.nn as nn import torch.optim as optim import torchvision import torchvision.transforms as transforms import matplotlib.pyplot 阅读全文
posted @ 2025-10-15 22:27 ouyeye 阅读(6) 评论(0) 推荐(0)
摘要: 111 阅读全文
posted @ 2025-10-13 21:46 ouyeye 阅读(5) 评论(0) 推荐(0)