摘要: #include <iostream> using namespace std; class MyCin { // 在此处补充你的代码 public: bool flag = false; MyCin & operator>> (int & n) { cin >> n; if (n == -1 || 阅读全文
posted @ 2022-02-23 17:52 icefield817 阅读(151) 评论(0) 推荐(0) 编辑
摘要: #include <iostream> #include <string> using namespace std; // 在此处补充你的代码 template<class T,class F> T Filter(T ar,T arEnd, T resAr, F fun) { for (ar;ar 阅读全文
posted @ 2022-02-23 16:59 icefield817 阅读(61) 评论(0) 推荐(0) 编辑
摘要: #include <iostream> #include <string> using namespace std; template <class T> T SumArray(T(*ar), T(*arEnd)) { if (ar == arEnd) return * ar; T res = *a 阅读全文
posted @ 2022-02-23 12:10 icefield817 阅读(59) 评论(0) 推荐(0) 编辑
摘要: #include <iostream> #include <string> using namespace std; // 在此处补充你的代码 template<class T, class F> void MyForeach(T ar,T arEnd,F fun) { for (;ar != ar 阅读全文
posted @ 2022-02-23 12:08 icefield817 阅读(73) 评论(0) 推荐(0) 编辑