Skip to content

Instantly share code, notes, and snippets.

View Mryan2005's full-sized avatar
🎯
Preparing for CET-6

Yan Zhizhong Mryan2005

🎯
Preparing for CET-6
View GitHub Profile
@Mryan2005
Mryan2005 / wumpus.py
Created March 5, 2025 04:07
wumpus world
import collections
from collections import defaultdict, Counter
class Expr:
def __init__(self, op, *args):
self.op = str(op)
self.args = args
def __invert__(self):
return Expr('~', self)
import os,sys
print("1.现写现用\n2.TXT转xml")
choose=input("请选择(输入数字):")
if choose == '1':
event=["sentence","source","author","type","usage_first","usage_second","history"]
sql_file = open('./Excerpt.xml','w')
sql_file.write('<?xml version="1.0" standalone="yes"?>\n<DocumentElement>\n')
while True:
time_null = 0
sql_file.write(" <sentences>\n")
@Mryan2005
Mryan2005 / children.html
Last active December 6, 2024 13:07
父窗口与子iframe之间的监听
<html>
<!-- Code -->
<script>window.parent.postMessage('Login Success', window.parent.location);</script>
<!-- Code -->
</html>
@Mryan2005
Mryan2005 / 机器翻译.cpp
Last active September 6, 2024 15:01
OpenJudge | 机器翻译
#include <bits/stdc++.h>
using namespace std;
int main() {
int M, N, count = 0;
int num;
cin >> M >> N;
bool mp[1000005] = {0};
queue<int> q;
@Mryan2005
Mryan2005 / BinaryTree.c
Created July 6, 2024 02:03
Binary tree
#include <stdio.h>
#include <stdlib.h>
#include <windows.h>
// 枚举方向
typedef enum direction {Left, Right} direction;
// 队列结构体
typedef struct QueueNode {
int data;