== 소감 == 오답 잡던 도중에 친구가 소주한잔 하자고 해서.. 일단 여기까지하고~ 소주 마시던 중 격좌좌표를 기하좌표로 옮기는 과정을 생략한 것이 생각나서 술자리를 파한 후 취중 개코딩..-..ㅡ;; 빙고! ㅋㄷㅋㄷ == 소스파일 == {{{~cpp #include #include using namespace std; int ax1,ax2,ax3,ay1,ay2,ay3; int bx1,bx2,bx3,by1,by2,by3; double centroid_ax, centroid_ay, centroid_bx, centroid_by; void findPoint() { centroid_ax = (double)(ax1+ax2+ax3)/3; centroid_ay = (double)(ay1+ay2+ay3)/3; centroid_bx = (double)(bx1+bx2+bx3)/3; centroid_by = (double)(by1+by2+by3)/3; centroid_ax = centroid_ax + (centroid_ay/2); centroid_ay = centroid_ay*sqrt(3.0)/2; centroid_bx = centroid_bx + (centroid_by/2); centroid_by = centroid_by*sqrt(3.0)/2; } int findRow(int x) { int row = ceil(sqrt(x+1)) * (-1); return row ; } void findLength() { cout.setf(ios::fixed, ios::floatfield); cout.setf(ios::showpoint); cout.precision(3); cout << sqrt(pow((centroid_bx - centroid_ax), 2) + pow((centroid_by - centroid_ay), 2)) <> x >> y) process(x, y); return 0; } }}}