摘要: 1 #include<bits/stdc++.h> 2 using namespace std; 3 int dx[]={0,1,0,-1}; 4 int dy[]={1,0,-1,0}; 5 struct sj 6 { 7 int x,y,turn; 8 }s,t,p; 9 queue<sj> q 阅读全文
posted @ 2022-01-28 10:40 jetaim 阅读(24) 评论(0) 推荐(0) 编辑
摘要: 1 #include<bits/stdc++.h> 2 using namespace std; 3 int a[101][101],q[101]; 4 bool vis[101]; 5 int max1=0,n,k,u,v,tot=0; 6 void search(int x) 7 { 8 int 阅读全文
posted @ 2022-01-27 16:12 jetaim 阅读(42) 评论(0) 推荐(0) 编辑
摘要: 1 #include<bits/stdc++.h> 2 #define N 11 3 using namespace std; 4 int a[N][N]; 5 int vis[N][N]; 6 int dir[4][2]={{-1,0},{1,0},{0,-1},{0,1}}; 7 int cnt 阅读全文
posted @ 2022-01-27 16:11 jetaim 阅读(155) 评论(0) 推荐(0) 编辑
摘要: 1 #include <bits/stdc++.h> 2 #define maxn 1000 3 char num[33]; 4 int len,q[maxn],Visited[11]; 5 long long ans = 1; 6 int main () 7 { 8 int i,j,k; 9 in 阅读全文
posted @ 2022-01-27 16:11 jetaim 阅读(28) 评论(0) 推荐(0) 编辑
摘要: 1 #include<bits/stdc++.h> 2 using namespace std; 3 int n,a,b,tot=10001; 4 int lc[201]; 5 bool vis[201]; 6 void dfs(int now,int step) 7 { 8 if(step>tot 阅读全文
posted @ 2022-01-27 10:54 jetaim 阅读(64) 评论(0) 推荐(0) 编辑
摘要: //仅含加减乘除 #include<bits/stdc++.h>using namespace std;int opt(int a,int b,char c){ if(c=='+') return a+b; if(c=='-') return a-b; if(c=='*') return a*b; 阅读全文
posted @ 2022-01-26 22:05 jetaim 阅读(38) 评论(0) 推荐(0) 编辑
摘要: 设有n个任务由k个可并行工作的机器来完成,完成任务i需要时间为。试设计一个算法找出完成这n个任务的最佳调度,使完成全部任务的时间最早。 阅读全文
posted @ 2022-01-25 15:08 jetaim 阅读(44) 评论(0) 推荐(0) 编辑
摘要: 题目背景 给定无向连通图G和m种不同的颜色。用这些颜色为图G的各顶点着色,每个顶点着一种颜色。如果有一种着色法使G中每条边的2个顶点着不同颜色,则称这个图是m可着色的。图的m着色问题是对于给定图G和m种颜色,找出所有不同的着色法。 题目描述 对于给定的无向连通图G和m种不同的颜色,编程计算图的所有不 阅读全文
posted @ 2022-01-25 15:05 jetaim 阅读(60) 评论(0) 推荐(0) 编辑
摘要: 题目描述 原始部落 byteland 中的居民们为了争夺有限的资源,经常发生冲突。几乎每个居民都有他的仇敌。部落酋长为了组织一支保卫部落的队伍,希望从部落的居民中选出最多的居民入伍,并保证队伍中任何 222 个人都不是仇敌。 给定 byteland 部落中居民间的仇敌关系,编程计算组成部落卫队的最佳 阅读全文
posted @ 2022-01-25 14:34 jetaim 阅读(154) 评论(0) 推荐(0) 编辑
摘要: 有一个n*n的迷宫(2<=n<=10),入口在左上角,出口在右上角,0表示可通,1表示障碍。从某点开始有八个方向可以走,输出从入口到出口的路径总数。 1 #include<bits/stdc++.h> 2 using namespace std; 3 int s[11][11]; 4 int wx[ 阅读全文
posted @ 2022-01-25 14:27 jetaim 阅读(82) 评论(0) 推荐(0) 编辑
点击右上角即可分享
微信分享提示