鱼儿恋上水
鱼儿恋上水
全部文章
题解
计算机历年考研复试上机题(1)
归档
标签
去牛客网
登录
/
注册
计算机历年考研复试上机题
What does not kill you makes you stronger!
全部文章
/ 题解
(共57篇)
abc
来自专栏
解法1:三重循环 #include <iostream> #include <cstdio> using namespace std; int main(){ int a, b, c; for(a = 1; a <= 9; a++) fo...
2020-04-23
8
1051
百鸡问题
来自专栏
解法1 #include <algorithm> #include <cstdio> #include <cmath> #include <iostream> using namespace std; int main(){ int n, x,...
2020-04-23
22
2105
最短路径
来自专栏
①弗洛伊德算法 #include <bits/stdc++.h> using namespace std; int n, m;//n城市个数、m道路数 const int MAXV = 105; //大数结构体 struct bign{ int d[150], len; ...
2020-04-23
0
853
I Wanna Go Home
来自专栏
Dijkstra算法 ①对跨越两个阵营的边只保留单向边 #include <algorithm> #include <cstdio> #include <iostream> using namespace std; const int MAXV = 1010; c...
2020-04-16
8
832
最短路径问题
来自专栏
#include <bits/stdc++.h> using namespace std; const int MAXV = 1010; const int INF = 1e9; struct Node{ int v, dis, co; Node(int _v, int...
2020-04-13
0
752
Head of a Gang
来自专栏
#include <stdio.h> #include <string.h> #include <algorithm> using namespace std; const int N = 26; // 成员 typedef struct Person { ...
2020-04-09
0
785
连通图
来自专栏
并查集 #include <iostream> #include <cstdio> using namespace std; #define _for(i, a, b) for(int i = a; i <= b; ++i) const int N = 1010; i...
2020-04-09
0
691
畅通工程
来自专栏
#include <cstring> #include <iostream> #include <set> using namespace std; #define _for(i, a, b) for(int i = a; i < b; i++) const...
2020-04-07
0
893
大整数排序
来自专栏
简单的字符串排序,用到了sort()函数,关键在于cmp规则的编写 #include <iostream> #include <cstring> #include <string> #include <algorithm> using namespac...
2020-04-06
8
960
浮点数加法
来自专栏
利用结构体存储大整数将整数部分和小数部分分开存放处理在运算前将小数部分的数位对齐,通过在长度较短的数字字符串后添0实现 #include <iostream> #include <cstdio> #include <cstring> #include <st...
2020-04-06
7
1003
首页
上一页
1
2
3
4
5
6
下一页
末页