結果
| 問題 | No.550 夏休みの思い出(1) |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2017-07-29 00:07:48 |
| 言語 | C++11(廃止可能性あり) (gcc 13.3.0 + boost 1.89.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 709 bytes |
| 記録 | |
| コンパイル時間 | 714 ms |
| コンパイル使用メモリ | 81,560 KB |
| 実行使用メモリ | 5,248 KB |
| 最終ジャッジ日時 | 2024-10-10 06:58:52 |
| 合計ジャッジ時間 | 2,289 ms |
|
ジャッジサーバーID (参考情報) |
judge3 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 26 WA * 29 |
ソースコード
#include<cstdio>
#include<iostream>
#include<algorithm>
#include<string>
#include<queue>
#include<vector>
#include<functional>
#include<cmath>
#include<map>
#include<stack>
#include<set>
#include<numeric>
#include<limits>
#define all(x) (x).begin(),(x).end()
#define rall(x) (x).rbegin(),(x).rend()
using namespace std;
typedef long long ll;
typedef pair<int, int> pi;
typedef pair<ll, ll> pl;
typedef pair<ll, string> pls;
ll ans[5];
int main()
{
ll a, b, c;
cin >> a >> b >> c;
int j = 0;
for (ll i = -1000000; i <= 1000000; i++) {
if (((i*i*i) + a*(i*i) + b*i + c)== 0) {
ans[j++] = i;
}
}
sort(ans, ans + 3);
cout << ans[0] << " " << ans[1] << " " << ans[2] << endl;
return 0;
}