This repository has been archived on 2026-07-28. You can view files and clone it. You cannot open issues or pull requests or push a commit.
Files
cmc/contests/1contest/2.cpp
T
2025-04-13 21:48:15 +03:00

27 lines
360 B
C++
Executable File

#include <iostream>
class A {
private:
int x;
bool to_print;
public:
A() {
x = 0;
to_print = false;
}
A(const A& a) {
std::cin >> x;
int t;
std::cin >> t;
x += t;
to_print = true;
}
~A() {
if (to_print) {
std::cout << x << std::endl;
}
}
};