- 博客(16)
- 收藏
- 关注
原创 问题 C: 【宽搜入门】8数码难题
#include <iostream>#include <cstdio>#include <cstring>#include <algorithm>#include <stack>#include <climits>#include <vector>#include <cmath>#i...
2020-03-04 23:07:00
23
原创 问题 B: DFS or BFS?
#include <iostream>#include <cstdio>#include <cstring>#include <algorithm>#include <stack>#include <climits>#include <vector>#include <cmath>#i...
2020-03-04 18:46:00
21
原创 问题 A: 简单计算器
#include <iostream>#include <cstdio>#include <cstring>#include <algorithm>#include <stack>using namespace std;int get_priority(char &op) { if (op == '+...
2020-03-02 21:13:00
23
原创 问题 F: 10进制 VS 2进制
#include <iostream>#include <cstdio>#include <cstring>#include <algorithm>using namespace std;void convert(int in[], int len, int out[],int &ks, int m, int n) { ...
2020-02-29 23:44:00
14
原创 问题 D: 进制转换
#include <iostream>#include <cstdio>#include <cstring>using namespace std;int main() { int m, n; while (scanf("%d", &m) != EOF) { scanf("%d", &n); ...
2020-02-29 23:22:00
16
原创 问题 C: 浮点数加法
#include <iostream>#include <cstdio>#include <cstring>using namespace std;struct big_number { int d[10010], len; big_number() { memset(d, 0, sizeof(d)); ...
2020-02-29 22:29:00
26
原创 问题 A: a+b
#include <cstdio>#include <cstring>using namespace std;struct big_number { int d[1001], len; big_number() { memset(d, 0, sizeof(d)); len = 0; }};big_...
2020-02-28 16:28:00
9
原创 问题 D: 约数的个数
#include <iostream>#include <string>#include <algorithm>#include <cmath>using namespace std;const int MAX_LEN = 100000;struct factor { int x, count;}factors[10];...
2020-02-27 17:03:00
13
原创 问题 B: 基础排序III:归并排序
#include <cstdio>#include <vector>#include <algorithm>using namespace std;void merge(int a[], int l1, int r1, int l2, int r2) { int i = l1, j = l2; int n = r2 - l1 +...
2020-02-22 20:01:00
13
原创 问题 C: 查找
#include <cstdio>#include <vector>#include <algorithm>using namespace std;bool b_search(const vector<int> &a, int x) { int left = 0, right = a.size() - 1; ...
2020-02-22 16:20:00
29
原创 问题 C: To Fill or Not to Fill
#include <cstdio>#include <vector>#include <algorithm>#include <cmath>using namespace std;struct station { double per_price; double distance;};bool cmp(const...
2020-02-19 18:15:00
15
原创 问题 D: 八皇后
#include <cstdio>#include <vector>#include <algorithm>using namespace std;const int N = 8;vector<long> s;bool flag[N] = {false};int a[N];void help(int index) { ...
2020-02-15 23:06:00
11
原创 问题 C: 神奇的口袋
#include <cstdio>using namespace std;int n1;int nums[99];int help(int i, int sum) { if (sum == 0) return 1; if (sum < 0 || i > n1) return 0; return help(i + 1, sum -...
2020-02-15 22:27:00
23
原创 问题 B: 分组统计
#include <cstdio>#include <map>#include <algorithm>#include <set>using namespace std;int main() { int m; while (scanf("%d", &m) != EOF) { for (int...
2020-02-14 22:46:00
14
原创 问题 I: 排名
#include <cstdio>#include <cstring>#include <algorithm>#include <vector>using namespace std;struct stu { char id[10]; int sum;};int main() { int n, m, g...
2020-02-14 21:25:00
8
原创 问题 E: Problem B
#include <cstdio>#include <cstring>#include <algorithm>#include <vector>using namespace std;int main() { int n; while (scanf("%d", &n) != EOF) { ...
2020-02-14 20:25:00
16
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人