- 博客(19)
- 收藏
- 关注
原创 修改代码随手记1——博客园
BST重点是remove函数文中“公有”和“私有”同名;调用哪个就看起来迷惑。inorder其实改为preorder了。remove中new调用的是私有;Node的构造走的是Node…*.h文件#pragma once#include<iostream>using namespace std;template<typename T>class BST {private: //节点类 struct Node { T value; Node* left,
2022-03-04 19:03:10
134
1
原创 05_03洛谷,迷
#include<iostream>using namespace std;int main() { int H = 8; unsigned long long s, v, t = 0; cin >> s >> v; if (s % v) { t = s / v + 1 + 10; } else t += 10; if (t - 60 < 0) { --H; t = 60 .
2021-05-03 17:28:37
40
原创 P2911
#include<iostream>using namespace std;int main(){ int s1, s2, s3; cin >> s1 >> s2 >> s3; int a[81] = { 0 },sum=0;//? for (int i = 1; i <= s1; ++i) { for (int j = 1; j <= s2; ++j) { for (i.
2021-03-28 21:25:21
168
原创 2021-03-28洛谷的一个题
哦,我的老天。不明白最后(第四种情况)else那儿#include<iostream>using namespace std;int main() { int a[40][40] = {0}; int N,x=1,y=0; cin >> N; y = (1 + N) / 2; a[x][y] = 1; for (int K = 2; K <= N * N; ++K) { if (x == 1 &&
2021-03-28 19:27:01
49
原创 进制转化题。输出“?3”。。。就离谱
#include<iostream>using namespace std;int main() { //是说逐个取余正放入数组。反向输出进制。 int N, i = 0, a[10], b[10]; char c[10]; cin >> N; while (N) { a[i] = N % 2; N /= 2; ++i; }i--; cout << "N转为二进制为:".
2021-03-28 09:56:26
106
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人