网站首页 站内搜索

搜索结果

查询Tags标签: std,共有 1098条记录
  • 精弘网络暑期 C++ 考核赛

    被打爆了A.Jinghong Union 转义一下就好 #include<bits/stdc++.h> using namespace std; int main() {cout << "\"" << "Welcome to Jinghong Union." << "\"";return 0; }B.i18n and l10n #include<…

    2021/9/17 17:05:12 人评论 次浏览
  • 精弘网络暑期 C++ 考核赛

    被打爆了A.Jinghong Union 转义一下就好 #include<bits/stdc++.h> using namespace std; int main() {cout << "\"" << "Welcome to Jinghong Union." << "\"";return 0; }B.i18n and l10n #include<…

    2021/9/17 17:05:12 人评论 次浏览
  • Thread线程函数参数传递 C++篇

    #include <iostream> #include <thread>using namespace std;void f(int i,std::string const& s) {for(int j=0;j<=i;j++){cout<<s<<endl;} }int main() {std::thread t(f,3,"hello");t.join();return 0; }如上文的可执行代码所…

    2021/9/17 11:04:46 人评论 次浏览
  • Thread线程函数参数传递 C++篇

    #include <iostream> #include <thread>using namespace std;void f(int i,std::string const& s) {for(int j=0;j<=i;j++){cout<<s<<endl;} }int main() {std::thread t(f,3,"hello");t.join();return 0; }如上文的可执行代码所…

    2021/9/17 11:04:46 人评论 次浏览
  • Codeforces Round #739 (Div. 3)

    A. Dislike of Threes B. Whos Opposite? #include<bits/stdc++.h> using namespace std;int t, a, b, c;int main() {cin >> t;for(int i = 1; i <= t; i++) {cin >> a >> b >> c;int d = max(a, b) - min(a, b);if(a > 2 * d || b…

    2021/9/17 6:07:57 人评论 次浏览
  • Codeforces Round #739 (Div. 3)

    A. Dislike of Threes B. Whos Opposite? #include<bits/stdc++.h> using namespace std;int t, a, b, c;int main() {cin >> t;for(int i = 1; i <= t; i++) {cin >> a >> b >> c;int d = max(a, b) - min(a, b);if(a > 2 * d || b…

    2021/9/17 6:07:57 人评论 次浏览
  • C++ 代码简化之道

    极简主义者,崇尚简洁明快的代码风格,这也可能是不喜欢Java全家桶的原因……当然我说的简洁是要建立在不降低可读性的前提下,即不影响代码本身的表现力。如果为求代码精简而让代码晦涩艰深同样不可取。 本文会介绍10个条款。 1. 善用emplace C++11开始STL容器出现了empl…

    2021/9/16 14:06:33 人评论 次浏览
  • C++ 代码简化之道

    极简主义者,崇尚简洁明快的代码风格,这也可能是不喜欢Java全家桶的原因……当然我说的简洁是要建立在不降低可读性的前提下,即不影响代码本身的表现力。如果为求代码精简而让代码晦涩艰深同样不可取。 本文会介绍10个条款。 1. 善用emplace C++11开始STL容器出现了empl…

    2021/9/16 14:06:33 人评论 次浏览
  • 求斐波那契数列前n项(循环结构)

    #include <iostream> using namespace std;void Fibonacci(int n) {unsigned int a = 1, b = 1;cout << a << \t << b << \t;for (int t = 3; t <= n; ++t){b = a + b;a = b - a;cout << b << \t;} }int main() {unsigned i…

    2021/9/15 23:08:50 人评论 次浏览
  • 求斐波那契数列前n项(循环结构)

    #include <iostream> using namespace std;void Fibonacci(int n) {unsigned int a = 1, b = 1;cout << a << \t << b << \t;for (int t = 3; t <= n; ++t){b = a + b;a = b - a;cout << b << \t;} }int main() {unsigned i…

    2021/9/15 23:08:50 人评论 次浏览
  • C++设计模式——观察者模式(Observer Pattern)

    C++设计模式——观察者模式(Observer Pattern)微信公众号:幼儿园的学霸目录文章目录 C++设计模式——观察者模式(Observer Pattern)目录前言定义代码示例总结观察者模式和中介模式优缺点适用场景及应用示例 参考资料前言 观察者模式面向的需求是:A对象(观察者)对B对象…

    2021/9/15 22:35:18 人评论 次浏览
  • C++设计模式——观察者模式(Observer Pattern)

    C++设计模式——观察者模式(Observer Pattern)微信公众号:幼儿园的学霸目录文章目录 C++设计模式——观察者模式(Observer Pattern)目录前言定义代码示例总结观察者模式和中介模式优缺点适用场景及应用示例 参考资料前言 观察者模式面向的需求是:A对象(观察者)对B对象…

    2021/9/15 22:35:18 人评论 次浏览
  • C++ for_each

    for_each是C++泛型算法,其源码如下:template<typename _InputIterator, typename _Function>_Functionfor_each(_InputIterator __first, _InputIterator __last, _Function __f){// concept requirements__glibcxx_function_requires(_InputIteratorConcept<_…

    2021/9/15 17:04:46 人评论 次浏览
  • C++ for_each

    for_each是C++泛型算法,其源码如下:template<typename _InputIterator, typename _Function>_Functionfor_each(_InputIterator __first, _InputIterator __last, _Function __f){// concept requirements__glibcxx_function_requires(_InputIteratorConcept<_…

    2021/9/15 17:04:46 人评论 次浏览
  • std::function详解

    std::function简介 • 类模板声明 // MS C++ 2013 template<class _Fty> class function; template<class _Fty> class function : public _Get_function_impl<_Fty>::type { ... }// GCC 4.8.2 template<typename _Signature> …

    2021/9/14 23:07:25 人评论 次浏览
扫一扫关注最新编程教程