結果
| 問題 |
No.2765 Cross Product
|
| コンテスト | |
| ユーザー |
Today03
|
| 提出日時 | 2024-05-31 21:27:17 |
| 言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
AC
|
| 実行時間 | 2 ms / 2,000 ms |
| コード長 | 545 bytes |
| コンパイル時間 | 2,084 ms |
| コンパイル使用メモリ | 194,864 KB |
| 最終ジャッジ日時 | 2025-02-21 17:29:40 |
|
ジャッジサーバーID (参考情報) |
judge1 / judge1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 23 |
ソースコード
#include <bits/stdc++.h>
using namespace std;
using ll = long long;
const int INF = 1e9 + 10;
const ll INFL = 4e18;
int main() {
vector<ll> A(3), B(3);
for (int i = 0; i < 3; i++) {
cin >> A[i];
}
for (int i = 0; i < 3; i++) {
cin >> B[i];
}
// cross product
vector<ll> cross(3);
cross[0] = A[1] * B[2] - A[2] * B[1];
cross[1] = A[2] * B[0] - A[0] * B[2];
cross[2] = A[0] * B[1] - A[1] * B[0];
for (int i = 0; i < 3; i++) {
cout << cross[i] << " ";
}
cout << endl;
}
Today03