結果
| 問題 | No.3003 多項式の割り算 〜hard〜 |
| コンテスト | |
| ユーザー |
hitonanode
|
| 提出日時 | 2025-01-17 22:57:04 |
| 言語 | C++23 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
AC
|
| 実行時間 | 2 ms / 2,000 ms |
| コード長 | 429 bytes |
| コンパイル時間 | 1,092 ms |
| コンパイル使用メモリ | 84,800 KB |
| 実行使用メモリ | 5,248 KB |
| 最終ジャッジ日時 | 2025-01-17 22:57:16 |
| 合計ジャッジ時間 | 1,989 ms |
|
ジャッジサーバーID (参考情報) |
judge1 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 2 |
| other | AC * 20 |
ソースコード
#include <iostream>
#include <vector>
using namespace std;
using lint = long long;
int main() {
cin.tie(nullptr), ios::sync_with_stdio(false);
lint A, B;
cin >> A >> B;
B %= 3;
vector<lint> deg(B + 2);
deg.at(B) = A;
for (int i = (int)deg.size() - 1; i >= 2; --i) {
deg.at(i - 2) -= deg.at(i);
deg.at(i - 1) -= deg.at(i);
}
cout << deg.at(1) << ' ' << deg.at(0) << '\n';
}
hitonanode