Advertisement
Guest User

Untitled

a guest
Sep 26th, 2017
65
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.65 KB | None | 0 0
  1. #include <bits/stdc++.h>
  2. using ll = int64_t;
  3. using ld = long double;
  4. using namespace std;
  5.  
  6. int cnt = 0;
  7.  
  8. class C {
  9. public:
  10. int b;
  11.  
  12. C() {
  13. cnt++;
  14. }
  15.  
  16. C(const C& other) {
  17. (void)(other);
  18. cnt++;
  19. }
  20.  
  21. C(C&& other) noexcept {
  22. (void)(other);
  23. cnt++;
  24. }
  25. };
  26.  
  27. C F() {
  28. C res;
  29. res.b = 303;
  30. return res;
  31. }
  32.  
  33. int main() {
  34. #ifdef PAUNSVOKNO
  35. freopen("input.txt", "r", stdin); freopen("output.txt", "w", stdout);
  36. #endif
  37. ios_base::sync_with_stdio(false); cout.setf(ios::fixed); cout.precision(20);
  38. C a = F();
  39. cout << a.b << "\n";
  40. cout << cnt << "\n";
  41. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement