提交 4890a7a3 编写于 作者: 每日一练社区's avatar 每日一练社区

update solution.md

上级 53146583
......@@ -13,6 +13,7 @@
```cpp
```
### after
```cpp
......
......@@ -5,6 +5,7 @@
当然,这只是加了前2项而已。分子分母要求互质。
下面哪一项是<span style="color:red">错误</span>的?
## aop
### before
......@@ -13,6 +14,7 @@
#include <bits/stdc++.h>
using namespace std;
```
### after
```cpp
......
......@@ -35,6 +35,7 @@
99
10
```
**样例输出**
```
......@@ -53,6 +54,7 @@
#include <bits/stdc++.h>
using namespace std;
```
### after
```cpp
......@@ -83,6 +85,7 @@ int main()
return 0;
}
```
## 选项
......
......@@ -22,6 +22,7 @@ x星的国王有个怪癖,他只喜欢数字3,5和7。
#include <bits/stdc++.h>
using namespace std;
```
### after
```cpp
......
......@@ -22,6 +22,7 @@
#include <bits/stdc++.h>
using namespace std;
```
### after
```cpp
......
......@@ -64,6 +64,7 @@
#include <bits/stdc++.h>
using namespace std;
```
### after
```cpp
......
......@@ -67,6 +67,7 @@
#include <bits/stdc++.h>
using namespace std;
```
### after
```cpp
......
......@@ -14,6 +14,7 @@
#include <bits/stdc++.h>
using namespace std;
```
### after
```cpp
......
......@@ -66,6 +66,7 @@ int main()
```cpp
```
### after
```cpp
......
......@@ -52,6 +52,7 @@ bbccccddaaaacccc
#include <bits/stdc++.h>
using namespace std;
```
### after
```cpp
......
# 乘积尾零
如下的10行数据,每行有10个整数,请你求出它们的乘积的末尾有多少个零?
```
5650 4542 3554 473 946 4114 3871 9073 90 4329
2758 7949 6113 5659 5245 7432 3051 4434 6704 3594
......@@ -24,6 +25,7 @@
#include <bits/stdc++.h>
using namespace std;
```
### after
```cpp
......
......@@ -2,7 +2,7 @@
中国古代文献中,曾记载过“大衍数列”, 主要用于解释中国传统文化中的太极衍生原理。
它的前几项是:```0、2、4、8、12、18、24、32、40、50 …```
它的前几项是:`0、2、4、8、12、18、24、32、40、50 …`
其规律是:对偶数项,是序号平方再除2,奇数项,是序号平方减1再除2。
......@@ -33,6 +33,7 @@ int main()
```cpp
```
### after
```cpp
......
......@@ -47,6 +47,7 @@ C = [C1, C2, ... CN],
#include <bits/stdc++.h>
using namespace std;
```
### after
```cpp
......
......@@ -10,6 +10,7 @@ y年m月d日是哪一年的第几天。
```cpp
```
### after
```cpp
......
......@@ -22,6 +22,7 @@
34 76 -54 7
-4 5 23 9
```
**样例输出**
```
......@@ -56,6 +57,8 @@ int main()
}
```
## aop
### before
......@@ -63,6 +66,7 @@ int main()
```cpp
```
### after
```cpp
......
......@@ -54,6 +54,7 @@ int main(int argc, char *argv[])
```cpp
```
### after
```cpp
......
# 9数算式
观察如下的算式:
```
9213 x 85674 = 789314562
```
左边的乘数和被乘数正好用到了1~9的所有数字,每个1次。
而乘积恰好也是用到了1~9的所有数字,并且每个1次。
......@@ -24,6 +26,7 @@
#include <bits/stdc++.h>
using namespace std;
```
### after
```cpp
......
......@@ -13,7 +13,7 @@
格式是:人数,人数,...
例如,有一种可能是:```20,5,4,2,0```
例如,有一种可能是:`20,5,4,2,0`
以下<span style="color:red">错误</span>的一项是?
......@@ -25,6 +25,7 @@
#include <bits/stdc++.h>
using namespace std;
```
### after
```cpp
......
......@@ -50,6 +50,7 @@ o 6
#include <bits/stdc++.h>
using namespace std;
```
### after
```cpp
......
......@@ -55,6 +55,7 @@ o****o****
#include <bits/stdc++.h>
using namespace std;
```
### after
```cpp
......
......@@ -59,6 +59,7 @@ int main(int argc, char **argv)
```cpp
```
### after
```cpp
......
......@@ -32,6 +32,7 @@ int main()
```cpp
```
### after
```cpp
......
......@@ -52,6 +52,7 @@
using namespace std;
```
### after
```cpp
......
......@@ -56,6 +56,7 @@ int main()
```cpp
```
### after
```cpp
......
......@@ -110,6 +110,7 @@ int main()
```cpp
```
### after
```cpp
......
......@@ -77,6 +77,7 @@ int main()
```cpp
```
### after
```cpp
......
......@@ -46,6 +46,7 @@ Fibonacci数列的递推公式为:Fn=Fn-1+Fn-2,其中F1=F2=1。
#include <bits/stdc++.h>
using namespace std;
```
### after
```cpp
......
......@@ -124,6 +124,7 @@ int main()
```cpp
```
### after
```cpp
......
......@@ -95,6 +95,7 @@ int main()
```cpp
```
### after
```cpp
......
......@@ -42,6 +42,7 @@
#include <bits/stdc++.h>
using namespace std;
```
### after
```cpp
......
......@@ -21,6 +21,7 @@
#include <bits/stdc++.h>
using namespace std;
```
### after
```cpp
......
......@@ -72,6 +72,7 @@ int main()
```cpp
```
### after
```cpp
......
......@@ -27,6 +27,7 @@
```cpp
```
### after
```cpp
......
......@@ -39,6 +39,7 @@
#include <bits/stdc++.h>
using namespace std;
```
### after
```cpp
......
......@@ -28,6 +28,7 @@
#include <bits/stdc++.h>
using namespace std;
```
### after
```cpp
......
......@@ -56,6 +56,7 @@ J大臣想知道:他从某一个城市出发,中间不休息,到达另一
#include <bits/stdc++.h>
using namespace std;
```
### after
```cpp
......
......@@ -41,6 +41,7 @@
#include <bits/stdc++.h>
using namespace std;
```
### after
```cpp
......
......@@ -52,6 +52,7 @@ int main()
```cpp
```
### after
```cpp
......
......@@ -30,6 +30,7 @@
```cpp
```
### after
```cpp
......
......@@ -66,6 +66,7 @@ int main()
```cpp
```
### after
```cpp
......
......@@ -19,6 +19,7 @@
#include <bits/stdc++.h>
using namespace std;
```
### after
```cpp
......
......@@ -51,6 +51,7 @@ int main()
```cpp
```
### after
```cpp
......
......@@ -59,6 +59,7 @@ X 国王有一个地宫宝库,是 n×m 个格子的矩阵,每个格子放一
#include <bits/stdc++.h>
using namespace std;
```
### after
```cpp
......
......@@ -44,6 +44,7 @@
#include <bits/stdc++.h>
using namespace std;
```
### after
```cpp
......
......@@ -11,6 +11,7 @@
#include <bits/stdc++.h>
using namespace std;
```
### after
```cpp
......
......@@ -14,6 +14,7 @@
#include <map>
using namespace std;
```
### after
```cpp
......
......@@ -11,6 +11,7 @@
#include <bits/stdc++.h>
using namespace std;
```
### after
```cpp
......
......@@ -38,6 +38,7 @@
#include <bits/stdc++.h>
using namespace std;
```
### after
```cpp
......
......@@ -11,6 +11,7 @@
#include <bits/stdc++.h>
using namespace std;
```
### after
```cpp
......
......@@ -11,6 +11,7 @@
#include <bits/stdc++.h>
using namespace std;
```
### after
```cpp
......
......@@ -11,6 +11,7 @@
#include <bits/stdc++.h>
using namespace std;
```
### after
```cpp
......
......@@ -11,6 +11,7 @@
#include <bits/stdc++.h>
using namespace std;
```
### after
```cpp
......
......@@ -40,6 +40,7 @@
#include <bits/stdc++.h>
using namespace std;
```
### after
```cpp
......
......@@ -11,6 +11,7 @@
#include <bits/stdc++.h>
using namespace std;
```
### after
```cpp
......
......@@ -33,6 +33,7 @@
#include <bits/stdc++.h>
using namespace std;
```
### after
```cpp
......
......@@ -11,6 +11,7 @@
#include <bits/stdc++.h>
using namespace std;
```
### after
```cpp
......
......@@ -11,6 +11,7 @@
#include <bits/stdc++.h>
using namespace std;
```
### after
```cpp
......
......@@ -36,6 +36,7 @@
#include <bits/stdc++.h>
using namespace std;
```
### after
```cpp
......
......@@ -14,6 +14,7 @@
using namespace std;
```
### after
```cpp
......
......@@ -31,6 +31,7 @@
#include <bits/stdc++.h>
using namespace std;
```
### after
```cpp
......
......@@ -18,6 +18,7 @@ struct ListNode
ListNode(int x) : val(x), next(NULL) {}
};
```
### after
```cpp
......
......@@ -20,6 +20,7 @@ struct ListNode
ListNode(int x, ListNode *next) : val(x), next(next){};
};
```
### after
```cpp
......
......@@ -20,6 +20,7 @@ struct ListNode
ListNode(int x, ListNode *next) : val(x), next(next){};
};
```
### after
```cpp
......
......@@ -18,6 +18,7 @@ struct ListNode
ListNode(int x) : val(x), next(NULL) {}
};
```
### after
```cpp
......
......@@ -17,6 +17,7 @@ struct ListNode
ListNode(int x, ListNode *next) : val(x), next(next){};
};
```
### after
```cpp
......
......@@ -18,6 +18,7 @@ struct ListNode
ListNode(int x) : val(x), next(NULL) {}
};
```
### after
```cpp
......
......@@ -20,6 +20,7 @@ struct ListNode
ListNode(int x, ListNode *next) : val(x), next(next){};
};
```
### after
```cpp
......
......@@ -18,6 +18,7 @@ struct ListNode
ListNode(int x) : val(x), next(NULL) {}
};
```
### after
```cpp
......
......@@ -23,6 +23,7 @@ struct ListNode
ListNode(int x, ListNode *next) : val(x), next(next){};
};
```
### after
```cpp
......
......@@ -20,6 +20,7 @@ struct ListNode
ListNode(int x, ListNode *next) : val(x), next(next){};
};
```
### after
```cpp
......
......@@ -11,6 +11,7 @@
#include <bits/stdc++.h>
using namespace std;
```
### after
```cpp
......
......@@ -33,6 +33,7 @@
#include <bits/stdc++.h>
using namespace std;
```
### after
```cpp
......
......@@ -11,6 +11,7 @@
#include <bits/stdc++.h>
using namespace std;
```
### after
```cpp
......
......@@ -11,6 +11,7 @@
#include <bits/stdc++.h>
using namespace std;
```
### after
```cpp
......
......@@ -119,6 +119,7 @@
#include <bits/stdc++.h>
using namespace std;
```
### after
```cpp
......
......@@ -75,6 +75,7 @@ countAndSay(4) = 读 "21" = 一 个 2 + 一 个 1 = "12" + "11" = "1211"
#include <bits/stdc++.h>
using namespace std;
```
### after
```cpp
......
......@@ -12,6 +12,7 @@
#include <bits/stdc++.h>
using namespace std;
```
### after
```cpp
......
......@@ -60,6 +60,7 @@ P I
#include <bits/stdc++.h>
using namespace std;
```
### after
```cpp
......
......@@ -11,6 +11,7 @@
#include <bits/stdc++.h>
using namespace std;
```
### after
```cpp
......
......@@ -11,6 +11,7 @@
#include <bits/stdc++.h>
using namespace std;
```
### after
```cpp
......
......@@ -11,6 +11,7 @@
#include <bits/stdc++.h>
using namespace std;
```
### after
```cpp
......
......@@ -53,6 +53,7 @@
#include <bits/stdc++.h>
using namespace std;
```
### after
```cpp
......
......@@ -11,6 +11,7 @@
#include <bits/stdc++.h>
using namespace std;
```
### after
```cpp
......
......@@ -11,6 +11,7 @@
#include <bits/stdc++.h>
using namespace std;
```
### after
```cpp
......
......@@ -11,6 +11,7 @@
#include <bits/stdc++.h>
using namespace std;
```
### after
```cpp
......
......@@ -45,6 +45,7 @@
#include <bits/stdc++.h>
using namespace std;
```
### after
```cpp
......
......@@ -49,6 +49,7 @@ minStack.getMin(); --&gt; 返回 -2.
#include <bits/stdc++.h>
using namespace std;
```
### after
```cpp
......
......@@ -11,6 +11,7 @@
#include <bits/stdc++.h>
using namespace std;
```
### after
```cpp
......
......@@ -83,6 +83,7 @@
#include <bits/stdc++.h>
using namespace std;
```
### after
```cpp
......
......@@ -35,6 +35,7 @@
#include <bits/stdc++.h>
using namespace std;
```
### after
```cpp
......
......@@ -43,6 +43,7 @@
#include <bits/stdc++.h>
using namespace std;
```
### after
```cpp
......
......@@ -46,6 +46,7 @@
using namespace std;
```
### after
```cpp
......
......@@ -45,6 +45,7 @@
#include <bits/stdc++.h>
using namespace std;
```
### after
```cpp
......
......@@ -41,6 +41,7 @@
#include <bits/stdc++.h>
using namespace std;
```
### after
```cpp
......
......@@ -43,6 +43,7 @@
#include <bits/stdc++.h>
using namespace std;
```
### after
```cpp
......
......@@ -33,6 +33,7 @@
#include <bits/stdc++.h>
using namespace std;
```
### after
```cpp
......
......@@ -41,6 +41,7 @@
#include <bits/stdc++.h>
using namespace std;
```
### after
```cpp
......
......@@ -37,6 +37,7 @@
#include <bits/stdc++.h>
using namespace std;
```
### after
```cpp
......
......@@ -49,6 +49,7 @@
#include <bits/stdc++.h>
using namespace std;
```
### after
```cpp
......
......@@ -12,6 +12,7 @@
using namespace std;
```
### after
```cpp
......
......@@ -11,6 +11,7 @@
#include <bits/stdc++.h>
using namespace std;
```
### after
```cpp
......
......@@ -71,6 +71,7 @@ struct ListNode
ListNode(int x) : val(x), next(NULL) {}
};
```
### after
```cpp
......
......@@ -68,6 +68,7 @@ struct ListNode
ListNode(int x) : val(x), next(NULL) {}
};
```
### after
```cpp
......
......@@ -18,6 +18,7 @@ struct ListNode
ListNode(int x) : val(x), next(NULL) {}
};
```
### after
```cpp
......
......@@ -64,6 +64,7 @@ for (int i = 0; i &lt; len; i++) {
#include <bits/stdc++.h>
using namespace std;
```
### after
```cpp
......
......@@ -66,6 +66,7 @@ for (int i = 0; i &lt; len; i++) {
#include <bits/stdc++.h>
using namespace std;
```
### after
```cpp
......
......@@ -11,6 +11,7 @@
#include <bits/stdc++.h>
using namespace std;
```
### after
```cpp
......
......@@ -52,6 +52,7 @@ struct TreeNode
TreeNode(int x, TreeNode *left, TreeNode *right) : val(x), left(left), right(right) {}
};
```
### after
```cpp
......
......@@ -43,6 +43,7 @@ struct TreeNode
TreeNode(int x, TreeNode *left, TreeNode *right) : val(x), left(left), right(right) {}
};
```
### after
```cpp
......
......@@ -22,6 +22,7 @@ struct TreeNode
};
```
### after
```cpp
......
......@@ -52,6 +52,7 @@ struct TreeNode
TreeNode(int x, TreeNode *left, TreeNode *right) : val(x), left(left), right(right) {}
};
```
### after
```cpp
......
......@@ -55,6 +55,7 @@ struct TreeNode
TreeNode(int x, TreeNode *left, TreeNode *right) : val(x), left(left), right(right) {}
};
```
### after
```cpp
......
......@@ -37,6 +37,7 @@
#include <bits/stdc++.h>
using namespace std;
```
### after
```cpp
......
......@@ -21,6 +21,7 @@ struct TreeNode
TreeNode(int x, TreeNode *left, TreeNode *right) : val(x), left(left), right(right) {}
};
```
### after
```cpp
......
......@@ -21,6 +21,7 @@ struct TreeNode
TreeNode(int x, TreeNode *left, TreeNode *right) : val(x), left(left), right(right) {}
};
```
### after
```cpp
......
......@@ -50,6 +50,7 @@ struct TreeNode
TreeNode(int x, TreeNode *left, TreeNode *right) : val(x), left(left), right(right) {}
};
```
### after
```cpp
......
......@@ -45,6 +45,7 @@ struct TreeNode
TreeNode(int x, TreeNode *left, TreeNode *right) : val(x), left(left), right(right) {}
};
```
### after
```cpp
......
......@@ -18,6 +18,7 @@
#include <bits/stdc++.h>
using namespace std;
```
### after
```cpp
......
......@@ -64,6 +64,7 @@
#include <bits/stdc++.h>
using namespace std;
```
### after
```cpp
......
......@@ -45,6 +45,7 @@
#include <bits/stdc++.h>
using namespace std;
```
### after
```cpp
......
......@@ -11,6 +11,7 @@
#include <bits/stdc++.h>
using namespace std;
```
### after
```cpp
......
......@@ -11,6 +11,7 @@
#include <bits/stdc++.h>
using namespace std;
```
### after
```cpp
......
......@@ -18,6 +18,7 @@
#include <bits/stdc++.h>
using namespace std;
```
### after
```cpp
......
......@@ -58,6 +58,7 @@
#include <bits/stdc++.h>
using namespace std;
```
### after
```cpp
......
......@@ -51,6 +51,7 @@
#include <bits/stdc++.h>
using namespace std;
```
### after
```cpp
......
......@@ -39,6 +39,7 @@
#include <bits/stdc++.h>
using namespace std;
```
### after
```cpp
......
......@@ -13,6 +13,7 @@
#include <bits/stdc++.h>
using namespace std;
```
### after
```cpp
......
......@@ -43,6 +43,7 @@
#include <bits/stdc++.h>
using namespace std;
```
### after
```cpp
......
......@@ -102,6 +102,7 @@ public:
}
};
```
### after
```cpp
......
......@@ -50,6 +50,7 @@
#include <bits/stdc++.h>
using namespace std;
```
### after
```cpp
......
......@@ -48,6 +48,7 @@
#include <bits/stdc++.h>
using namespace std;
```
### after
```cpp
......
......@@ -49,6 +49,7 @@
#include <bits/stdc++.h>
using namespace std;
```
### after
```cpp
......
......@@ -67,6 +67,7 @@
#include <bits/stdc++.h>
using namespace std;
```
### after
```cpp
......
......@@ -11,6 +11,7 @@
#include <bits/stdc++.h>
using namespace std;
```
### after
```cpp
......
......@@ -57,6 +57,7 @@ struct TreeNode
TreeNode(int x, TreeNode *left, TreeNode *right) : val(x), left(left), right(right) {}
};
```
### after
```cpp
......
......@@ -62,6 +62,7 @@ struct TreeNode
};
```
### after
```cpp
......
......@@ -11,6 +11,7 @@
#include <bits/stdc++.h>
using namespace std;
```
### after
```cpp
......
......@@ -11,6 +11,7 @@
#include <bits/stdc++.h>
using namespace std;
```
### after
```cpp
......
......@@ -79,6 +79,7 @@ M 1000</pre>
#include <bits/stdc++.h>
using namespace std;
```
### after
```cpp
......
......@@ -11,6 +11,7 @@
#include <bits/stdc++.h>
using namespace std;
```
### after
```cpp
......
......@@ -11,6 +11,7 @@
#include <bits/stdc++.h>
using namespace std;
```
### after
```cpp
......
......@@ -11,6 +11,7 @@
#include <bits/stdc++.h>
using namespace std;
```
### after
```cpp
......
......@@ -11,6 +11,7 @@
#include <bits/stdc++.h>
using namespace std;
```
### after
```cpp
......
......@@ -11,6 +11,7 @@
#include <bits/stdc++.h>
using namespace std;
```
### after
```cpp
......
......@@ -17,6 +17,7 @@
#include <bits/stdc++.h>
using namespace std;
```
### after
```cpp
......
......@@ -79,6 +79,7 @@ M 1000</pre>
#include <bits/stdc++.h>
using namespace std;
```
### after
```cpp
......
......@@ -54,6 +54,7 @@ twitter.getNewsFeed(1); // 用户 1 获取推文应当返回一个列表,其
#include <bits/stdc++.h>
using namespace std;
```
### after
```cpp
......
......@@ -65,6 +65,7 @@ struct TreeNode
TreeNode(int x, TreeNode *left, TreeNode *right) : val(x), left(left), right(right) {}
};
```
### after
```cpp
......
......@@ -58,6 +58,7 @@ randomizedSet.getRandom(); // 由于 2 是集合中唯一的数字,getRandom
using namespace std;
```
### after
```cpp
......
......@@ -44,6 +44,7 @@ collection.getRandom();
#include <bits/stdc++.h>
using namespace std;
```
### after
```cpp
......
......@@ -71,6 +71,7 @@ lFUCache.get(4); // 返回 4
#include <bits/stdc++.h>
using namespace std;
```
### after
```cpp
......
......@@ -63,6 +63,7 @@ lRUCache.get(4); // 返回 4
#include <bits/stdc++.h>
using namespace std;
```
### after
```cpp
......
......@@ -77,6 +77,7 @@ struct TreeNode
TreeNode(int x, TreeNode *left, TreeNode *right) : val(x), left(left), right(right) {}
};
```
### after
```cpp
......
......@@ -52,6 +52,7 @@ trie.search("app"); // 返回 True
#include <bits/stdc++.h>
using namespace std;
```
### after
```cpp
......
......@@ -15,6 +15,7 @@
#include <bits/stdc++.h>
using namespace std;
```
### after
```cpp
......
......@@ -74,6 +74,7 @@ public:
const vector<NestedInteger> &getList() const;
};
```
### after
```cpp
......
......@@ -11,6 +11,7 @@
#include <bits/stdc++.h>
using namespace std;
```
### after
```cpp
......
......@@ -33,6 +33,7 @@
#include <bits/stdc++.h>
using namespace std;
```
### after
```cpp
......
......@@ -12,6 +12,7 @@
using namespace std;
```
### after
```cpp
......
......@@ -11,6 +11,7 @@
#include <bits/stdc++.h>
using namespace std;
```
### after
```cpp
......
......@@ -69,6 +69,7 @@
#include <bits/stdc++.h>
using namespace std;
```
### after
```cpp
......
......@@ -11,6 +11,7 @@
#include <bits/stdc++.h>
using namespace std;
```
### after
```cpp
......
......@@ -37,6 +37,7 @@
#include <bits/stdc++.h>
using namespace std;
```
### after
```cpp
......
......@@ -11,6 +11,7 @@
#include <bits/stdc++.h>
using namespace std;
```
### after
```cpp
......
......@@ -11,6 +11,7 @@
#include <bits/stdc++.h>
using namespace std;
```
### after
```cpp
......
......@@ -11,6 +11,7 @@
#include <bits/stdc++.h>
using namespace std;
```
### after
```cpp
......
......@@ -29,6 +29,7 @@
#include <bits/stdc++.h>
using namespace std;
```
### after
```cpp
......
......@@ -11,6 +11,7 @@
#include <bits/stdc++.h>
using namespace std;
```
### after
```cpp
......
......@@ -11,6 +11,7 @@
#include <bits/stdc++.h>
using namespace std;
```
### after
```cpp
......
......@@ -22,6 +22,7 @@
#include <bits/stdc++.h>
using namespace std;
```
### after
```cpp
......
......@@ -11,6 +11,7 @@
#include <bits/stdc++.h>
using namespace std;
```
### after
```cpp
......
......@@ -44,6 +44,7 @@
#include <bits/stdc++.h>
using namespace std;
```
### after
```cpp
......
......@@ -11,6 +11,7 @@
#include <bits/stdc++.h>
using namespace std;
```
### after
```cpp
......
......@@ -18,6 +18,7 @@
#include <bits/stdc++.h>
using namespace std;
```
### after
```cpp
......
......@@ -11,6 +11,7 @@
#include <bits/stdc++.h>
using namespace std;
```
### after
```cpp
......
......@@ -11,6 +11,7 @@
#include <bits/stdc++.h>
using namespace std;
```
### after
```cpp
......
......@@ -30,6 +30,7 @@
#include <bits/stdc++.h>
using namespace std;
```
### after
```cpp
......
......@@ -11,6 +11,7 @@
#include <bits/stdc++.h>
using namespace std;
```
### after
```cpp
......
......@@ -52,6 +52,7 @@
#include <bits/stdc++.h>
using namespace std;
```
### after
```cpp
......
......@@ -36,6 +36,7 @@
using namespace std;
```
### after
```cpp
......
......@@ -17,6 +17,7 @@
#include <bits/stdc++.h>
using namespace std;
```
### after
```cpp
......
......@@ -73,6 +73,7 @@
#include <bits/stdc++.h>
using namespace std;
```
### after
```cpp
......
......@@ -39,6 +39,7 @@
#include <bits/stdc++.h>
using namespace std;
```
### after
```cpp
......
......@@ -11,6 +11,7 @@
#include <bits/stdc++.h>
using namespace std;
```
### after
```cpp
......
......@@ -57,6 +57,7 @@ cost = [3,4,3]
#include <bits/stdc++.h>
using namespace std;
```
### after
```cpp
......
......@@ -52,6 +52,7 @@
#include <bits/stdc++.h>
using namespace std;
```
### after
```cpp
......
......@@ -38,6 +38,7 @@
#include <bits/stdc++.h>
using namespace std;
```
### after
```cpp
......
......@@ -43,6 +43,7 @@ k = <code>3</code>
#include <bits/stdc++.h>
using namespace std;
```
### after
```cpp
......
......@@ -594,6 +594,40 @@ def add_config_export_for_lanqiao_backup():
f.write(config_data_json)
def fixbug_for_md():
count = 0
dirs = ['data/2.算法中阶', 'data/3.算法高阶', 'data/1.算法初阶']
exercises_ids = []
for dir in dirs:
dirs_ = os.listdir(dir)
algo_floor_dirs = []
for algo_floor_dir in dirs_:
leetcode_class_dir = os.path.join(dir, algo_floor_dir)
if os.path.isdir(leetcode_class_dir):
algo_floor_dirs.append(leetcode_class_dir)
for algo_floor_dir in algo_floor_dirs:
exercises_dirs_ = os.listdir(algo_floor_dir)
exercises_dirs = []
for exercises_dir_ in exercises_dirs_:
exercises_dir = os.path.join(algo_floor_dir, exercises_dir_)
if os.path.isdir(exercises_dir):
exercises_dirs.append(exercises_dir)
for idx, tem_dir in enumerate(exercises_dirs):
print(tem_dir)
solution_md_path = os.path.join(tem_dir, 'solution.md')
with open(solution_md_path, 'r') as f:
solution_md_data = f.read()
if solution_md_data.find('\n\n### after') == -1:
solution_md_data = solution_md_data.replace('### after', '\n### after')
with open(solution_md_path, 'w') as f:
f.write(solution_md_data)
if helper_function == 'count_tag_class':
count_tag_class()
if helper_function == 'count_exercises':
......@@ -603,11 +637,14 @@ if helper_function == 'modify_back_up_dir_name':
add_solution_md_template_for_lanqiao()
# add_solution_md_template_for_lanqiao()
# add_color_for_special_exercises()
add_color_for_special_exercises()
fixbug_for_md()
# check_exercises_is_duplicate()
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册