2015-08-17 11:37:30 +02:00
|
|
|
#include <cstdio>
|
2019-11-11 23:01:05 +01:00
|
|
|
#include <iterator>
|
2018-10-28 12:09:07 +01:00
|
|
|
#include <memory>
|
|
|
|
|
2016-07-09 11:21:54 +02:00
|
|
|
int main()
|
|
|
|
{
|
2019-11-11 23:01:05 +01:00
|
|
|
int a[] = { 0, 1, 2 };
|
|
|
|
auto ai = std::cbegin(a);
|
|
|
|
|
|
|
|
int b[] = { 2, 1, 0 };
|
|
|
|
auto bi = std::cend(b);
|
|
|
|
|
2018-10-28 12:09:07 +01:00
|
|
|
std::unique_ptr<int> u(new int(0));
|
2019-11-11 23:01:05 +01:00
|
|
|
return *u + *ai + *(bi - 1);
|
2016-07-09 11:21:54 +02:00
|
|
|
}
|