|
|
back to boardWhy WA#10 // zadachki.cpp: определяет точку входа для консольного приложения. // #include <iostream> #include "vector" using namespace std; int main() { int n; double t; vector<double>x; vector<double>y; cin>>n; for(int i=0; i<n; i++) { cin>>t; x.push_back(t); cin>>t; y.push_back(t); } for(int i=0; i<n;i++) { double m=((x[(i+1)%n]-x[i])*(y[(i+2)%n]-y[(i+1)%n])-(x[(i+2)%n]-x[(i+1)%n])*(y[(i+1)%n]-y[i])); if (m>0) {cout<<"ccw"; return 0;} if (m<0) {cout<<"cw"; return 0;} } return 0; } WHY? Can anyone let me 7 test... Re: Why WA#10 sorry... 10 test Edited by author 07.11.2010 16:53 |
|
|