Submission #4650423
Source Code Expand
#include <cstdlib> #include <cmath> #include <climits> #include <cfloat> #include <map> #include <utility> #include <set> #include <iostream> #include <memory> #include <string> #include <vector> #include <algorithm> #include <functional> #include <sstream> #include <deque> #include <complex> #include <stack> #include <queue> #include <cstdio> #include <cctype> #include <cstring> #include <ctime> #include <iterator> #include <bitset> #include <numeric> #include <list> #include <iomanip> #include <stack> using namespace std; #define ll int64_t const long mod = 1e9 + 7; const long LINF = 1e13; const long LLINF = 1e18; const long ALPHABET = 26; template <class T> void Swap(T& r, T& l) { T tmp = r; r = l; l = tmp; } template<typename T> istream& operator >> (istream& is, vector<T>& vec) { for (T& x : vec) is >> x; //for(int i=0; i<vec.size(); i++) is >> x[i]; とかでもいい return is; } int main() { long n, a, b, c; double deg, dis; vector<pair<long,long>> p(3,pair<long,long>()); for (int i = 0; i < 3; ++i){ cin >> p[i].first; cin >> p[i].second; } long x = p[0].first;zs long y = p[0].second; p[0].first = 0; p[0].second = 0; p[1].first -= x; p[1].second -= y; p[2].first -= x; p[2].second -= y; double ans = 0; ans = abs(p[1].first * p[2].second - p[1].second * p[2].first) / 2; cout << ans <<endl; }
Submission Info
Submission Time | |
---|---|
Task | C - 直訴 |
User | popolo5555 |
Language | C++14 (GCC 5.4.1) |
Score | 0 |
Code Size | 1520 Byte |
Status | CE |
Compile Error
./Main.cpp: In function ‘int main()’: ./Main.cpp:67:23: error: ‘zs’ was not declared in this scope long x = p[0].first;zs ^ ./Main.cpp:74:18: error: ‘y’ was not declared in this scope p[1].second -= y; ^