#include <iostream>
using namespace std;

class foo
{
	public:
	foo() {}
	foo(const foo &f)
	{
		std::cout<< "огромный объкт, очень долго копируется" << std::endl
		<< "loading 0....." << std::endl
		<< "loading 10....." << std::endl
		<< "loading 20....." << std::endl
		<< "loading 40....." << std::endl
		<< "loading 80....." << std::endl
		<< "loading 100....." << std::endl
		;
	}
};

void bar(foo f)
{
	std::cout<< "закончили" << std::endl;
}

void baz(foo &f)
{
	std::cout<< "закончили" << std::endl;
}

int main() {
	
	foo f;
	
	std::cout<< "передаём в функцию объект по значению" << std::endl;
	bar(f);
	std::cout<< "передаём объект по ссылке" << std::endl;
	baz(f);
	// your code goes here
	return 0;
}