結果
問題 | No.2765 Cross Product |
ユーザー |
|
提出日時 | 2024-05-31 21:27:14 |
言語 | C++17(gcc12) (gcc 12.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 3 ms / 2,000 ms |
コード長 | 652 bytes |
コンパイル時間 | 2,310 ms |
コンパイル使用メモリ | 202,768 KB |
実行使用メモリ | 6,820 KB |
最終ジャッジ日時 | 2024-12-20 22:22:27 |
合計ジャッジ時間 | 3,251 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 23 |
ソースコード
#include <bits/stdc++.h>using namespace std;using ll = long long;template<class T> istream& operator >> (istream& is, vector<T>& vec) {for(T& x : vec) is >> x;return is;}template<class T> ostream& operator << (ostream& os, const vector<T>& vec) {if(vec.empty()) return os;os << vec[0];for(auto it = vec.begin(); ++it != vec.end(); ) os << ' ' << *it;return os;}int main(){ios::sync_with_stdio(false);cin.tie(0);vector<ll> a(3), b(3), c(3);cin >> a >> b;c[0] = a[1] * b[2] - b[1] * a[2];c[1] = a[2] * b[0] - b[2] * a[0];c[2] = a[0] * b[1] - b[0] * a[1];cout << c << '\n';}