結果
| 問題 |
No.550 夏休みの思い出(1)
|
| コンテスト | |
| ユーザー |
ei1333333
|
| 提出日時 | 2017-07-29 00:09:58 |
| 言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
TLE
|
| 実行時間 | - |
| コード長 | 968 bytes |
| コンパイル時間 | 1,727 ms |
| コンパイル使用メモリ | 167,752 KB |
| 実行使用メモリ | 16,840 KB |
| 最終ジャッジ日時 | 2024-10-10 07:00:47 |
| 合計ジャッジ時間 | 8,068 ms |
|
ジャッジサーバーID (参考情報) |
judge1 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | -- * 3 |
| other | TLE * 1 -- * 54 |
コンパイルメッセージ
main.cpp: In function 'int main()':
main.cpp:21:10: warning: use of an operand of type 'bool' in 'operator++' is deprecated [-Wdeprecated]
21 | if(flag++) cout << " ";
| ^~~~
main.cpp:25:10: warning: use of an operand of type 'bool' in 'operator++' is deprecated [-Wdeprecated]
25 | if(flag++) cout << " ";
| ^~~~
main.cpp:29:10: warning: use of an operand of type 'bool' in 'operator++' is deprecated [-Wdeprecated]
29 | if(flag++) cout << " ";
| ^~~~
main.cpp:33:10: warning: use of an operand of type 'bool' in 'operator++' is deprecated [-Wdeprecated]
33 | if(flag++) cout << " ";
| ^~~~
main.cpp:37:10: warning: use of an operand of type 'bool' in 'operator++' is deprecated [-Wdeprecated]
37 | if(flag++) cout << " ";
| ^~~~
main.cpp:41:10: warning: use of an operand of type 'bool' in 'operator++' is deprecated [-Wdeprecated]
41 | if(flag++) cout << " ";
| ^~~~
main.cpp:45:10: warning: use of an operand of type 'bool' in 'operator++' is deprecated [-Wdeprecated]
45 | if(flag++) cout << " ";
| ^~~~
main.cpp:49:10: warning: use of an operand of type 'bool' in 'operator++' is deprecated [-Wdeprecated]
49 | if(flag++) cout << " ";
| ^~~~
ソースコード
#include <bits/stdc++.h>
using namespace std;
typedef long long int64;
int main()
{
int64 A, B, C;
cin >> A >> B >> C;
bool flag = false;
auto f = [&](double x)
{
return abs(x * x * x + A * x * x + B * x + C);
};
for(int64 X = -1000000000; X < 1000000000; X += 8) {
if(f(X) < 1e-5) {
if(flag++) cout << " ";
cout << X;
}
if(f(X + 1) < 1e-5) {
if(flag++) cout << " ";
cout << X + 1;
}
if(f(X + 2) < 1e-5) {
if(flag++) cout << " ";
cout << X + 2;
}
if(f(X + 3) < 1e-5) {
if(flag++) cout << " ";
cout << X + 3;
}
if(f(X + 4) < 1e-5) {
if(flag++) cout << " ";
cout << X + 4;
}
if(f(X + 5) < 1e-5) {
if(flag++) cout << " ";
cout << X + 5;
}
if(f(X + 6) < 1e-5) {
if(flag++) cout << " ";
cout << X + 6;
}
if(f(X + 7) < 1e-5) {
if(flag++) cout << " ";
cout << X + 7;
}
}
cout << endl;
}
ei1333333