divyang4481 / mipt-hw

Automatically exported from code.google.com/p/mipt-hw
0 stars 0 forks source link

task05 Graham_scan (Яковенко) #199

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
iakovenko_pavel/task05_GrahamScan

Я немножко не разобрался как именно должна 
работать программа(интерфейс), поэтому 
сделал так, что на вход подается путь к 
входному файлу, а на выход в каталоге, где 
лежит программа, создается файл с 
результатами.
Выполнил программу с вашими данными. 
Проверил результат с помощью предыдущей 
задачи. Все верно. 
Я немножко не понял, надо ли высылать ответ, 
на всякий случай вышлю.

Original issue reported on code.google.com by iakovenk...@gmail.com on 12 Apr 2013 at 6:21

Attachments:

GoogleCodeExporter commented 9 years ago
Ах да, во входном файле в первой строчке 
подается количество точек. Ну я просто так 
сделал, чтобы сильно не заморачиваться :)

Original comment by iakovenk...@gmail.com on 12 Apr 2013 at 6:29

GoogleCodeExporter commented 9 years ago
Да. Действительно, я не указал четко в 
задании интерфейс общения с программой.
Поэтому - на Ваше усмотрение. Можно как Вы 
сказали, а можно - через stdin/stdout. А потом 
перенаправлять из/в файл.

Original comment by aivyu...@gmail.com on 12 Apr 2013 at 8:28

GoogleCodeExporter commented 9 years ago
У Вас в функции main() вообще пусто.

Поскольку все равно будете исправлять, 
давайте договоримся о взаимодействии с 
программой.
Файл с входными данными подается на stdin. 
Резальтат пишете в stdout.

Original comment by aivyu...@gmail.com on 28 Apr 2013 at 6:17

GoogleCodeExporter commented 9 years ago

Original comment by iakovenk...@gmail.com on 30 Apr 2013 at 1:51

GoogleCodeExporter commented 9 years ago
Программа не собирается:

/usr/include/c++/4.2.1/bits/stl_algo.h: In function ‘const _Tp& 
std::__median(const _Tp&, const _Tp&, const _Tp&) [with _Tp = TPoint]’:
/usr/include/c++/4.2.1/bits/stl_algo.h:2758:   instantiated from ‘void 
std::__introsort_loop(_RandomAccessIterator, _RandomAccessIterator, _Size) 
[with _RandomAccessIterator = __gnu_cxx::__normal_iterator<TPoint*, 
std::vector<TPoint, std::allocator<TPoint> > >, _Size = long int]’
/usr/include/c++/4.2.1/bits/stl_algo.h:2829:   instantiated from ‘void 
std::sort(_RandomAccessIterator, _RandomAccessIterator) [with 
_RandomAccessIterator = __gnu_cxx::__normal_iterator<TPoint*, 
std::vector<TPoint, std::allocator<TPoint> > >]’
main.cpp:64:   instantiated from here
/usr/include/c++/4.2.1/bits/stl_algo.h:91: error: passing ‘const TPoint’ as 
‘this’ argument of ‘bool TPoint::operator<(TPoint)’ discards qualifiers
/usr/include/c++/4.2.1/bits/stl_algo.h:92: error: passing ‘const TPoint’ as 
‘this’ argument of ‘bool TPoint::operator<(TPoint)’ discards qualifiers
/usr/include/c++/4.2.1/bits/stl_algo.h:94: error: passing ‘const TPoint’ as 
‘this’ argument of ‘bool TPoint::operator<(TPoint)’ discards qualifiers
/usr/include/c++/4.2.1/bits/stl_algo.h:98: error: passing ‘const TPoint’ as 
‘this’ argument of ‘bool TPoint::operator<(TPoint)’ discards qualifiers
/usr/include/c++/4.2.1/bits/stl_algo.h:100: error: passing ‘const TPoint’ 
as ‘this’ argument of ‘bool TPoint::operator<(TPoint)’ discards 
qualifiers

Original comment by aivyu...@gmail.com on 10 May 2013 at 7:49

GoogleCodeExporter commented 9 years ago

Original comment by iakovenk...@gmail.com on 16 May 2013 at 10:03

GoogleCodeExporter commented 9 years ago
Решение принято.

Original comment by aivyu...@gmail.com on 17 May 2013 at 12:15