結果
問題 | No.550 夏休みの思い出(1) |
ユーザー | ei1333333 |
提出日時 | 2017-07-29 00:24:34 |
言語 | C++14 (gcc 12.3.0 + boost 1.83.0) |
結果 |
TLE
(最新)
AC
(最初)
|
実行時間 | - |
コード長 | 1,695 bytes |
コンパイル時間 | 1,844 ms |
コンパイル使用メモリ | 172,656 KB |
実行使用メモリ | 6,824 KB |
最終ジャッジ日時 | 2024-10-10 11:05:27 |
合計ジャッジ時間 | 57,063 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge4 |
(要ログイン)
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | TLE | - |
testcase_01 | AC | 71 ms
6,816 KB |
testcase_02 | AC | 72 ms
6,816 KB |
testcase_03 | AC | 72 ms
6,816 KB |
testcase_04 | AC | 71 ms
6,816 KB |
testcase_05 | AC | 72 ms
6,816 KB |
testcase_06 | AC | 72 ms
6,820 KB |
testcase_07 | AC | 71 ms
6,820 KB |
testcase_08 | AC | 72 ms
6,816 KB |
testcase_09 | TLE | - |
testcase_10 | TLE | - |
testcase_11 | TLE | - |
testcase_12 | TLE | - |
testcase_13 | TLE | - |
testcase_14 | TLE | - |
testcase_15 | TLE | - |
testcase_16 | TLE | - |
testcase_17 | TLE | - |
testcase_18 | TLE | - |
testcase_19 | TLE | - |
testcase_20 | TLE | - |
testcase_21 | TLE | - |
testcase_22 | AC | 72 ms
6,820 KB |
testcase_23 | AC | 72 ms
6,820 KB |
testcase_24 | AC | 71 ms
6,816 KB |
testcase_25 | AC | 72 ms
6,820 KB |
testcase_26 | AC | 72 ms
6,820 KB |
testcase_27 | AC | 72 ms
6,816 KB |
testcase_28 | AC | 71 ms
6,820 KB |
testcase_29 | AC | 72 ms
6,820 KB |
testcase_30 | AC | 72 ms
6,816 KB |
testcase_31 | TLE | - |
testcase_32 | TLE | - |
testcase_33 | TLE | - |
testcase_34 | TLE | - |
testcase_35 | TLE | - |
testcase_36 | TLE | - |
testcase_37 | TLE | - |
testcase_38 | TLE | - |
testcase_39 | TLE | - |
testcase_40 | AC | 71 ms
6,820 KB |
testcase_41 | AC | 71 ms
6,820 KB |
testcase_42 | AC | 71 ms
6,816 KB |
testcase_43 | AC | 72 ms
6,820 KB |
testcase_44 | AC | 72 ms
6,820 KB |
testcase_45 | AC | 72 ms
6,816 KB |
testcase_46 | AC | 72 ms
6,816 KB |
testcase_47 | AC | 72 ms
6,816 KB |
testcase_48 | AC | 72 ms
6,820 KB |
testcase_49 | AC | 72 ms
6,820 KB |
testcase_50 | AC | 72 ms
6,816 KB |
testcase_51 | AC | 72 ms
6,820 KB |
testcase_52 | AC | 72 ms
6,820 KB |
testcase_53 | AC | 72 ms
6,820 KB |
testcase_54 | AC | 72 ms
6,820 KB |
testcase_55 | AC | 72 ms
6,816 KB |
testcase_56 | AC | 72 ms
6,820 KB |
testcase_57 | AC | 72 ms
6,820 KB |
コンパイルメッセージ
main.cpp: In function 'int main()': main.cpp:65:10: warning: use of an operand of type 'bool' in 'operator++' is deprecated [-Wdeprecated] 65 | if(flag++) cout << " "; | ^~~~ main.cpp:69:10: warning: use of an operand of type 'bool' in 'operator++' is deprecated [-Wdeprecated] 69 | if(flag++) cout << " "; | ^~~~ main.cpp:73:10: warning: use of an operand of type 'bool' in 'operator++' is deprecated [-Wdeprecated] 73 | if(flag++) cout << " "; | ^~~~ main.cpp:77:10: warning: use of an operand of type 'bool' in 'operator++' is deprecated [-Wdeprecated] 77 | if(flag++) cout << " "; | ^~~~ main.cpp:81:10: warning: use of an operand of type 'bool' in 'operator++' is deprecated [-Wdeprecated] 81 | if(flag++) cout << " "; | ^~~~ main.cpp:85:10: warning: use of an operand of type 'bool' in 'operator++' is deprecated [-Wdeprecated] 85 | if(flag++) cout << " "; | ^~~~ main.cpp:89:10: warning: use of an operand of type 'bool' in 'operator++' is deprecated [-Wdeprecated] 89 | if(flag++) cout << " "; | ^~~~ main.cpp:93:10: warning: use of an operand of type 'bool' in 'operator++' is deprecated [-Wdeprecated] 93 | 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 = [&](int64 x) { return (((x + A) * x + B) * x + C); }; auto g = [&](__int128 x) { return (((x + A) * x + B) * x + C); }; vector< int64 > vs; for(int64 X = -10000000; X < 10000000; X += 8) { if(g(X) == 0) { vs.push_back(X); } if(g(X + 1) == 0) { vs.push_back(X + 1); } if(g(X + 2) == 0) { vs.push_back(X + 2); } if(g(X + 3) == 0) { vs.push_back(X + 3); } if(g(X + 4) == 0) { vs.push_back(X + 4); } if(g(X + 5) == 0) { vs.push_back(X + 5); } if(g(X + 6) == 0) { vs.push_back(X + 6); } if(g(X + 7) == 0) { vs.push_back(X + 7); } } if(vs.size() == 3) { for(int i = 0; i < vs.size(); i++) { if(i) cout << " "; cout << vs[i]; } return (0); } vs.clear(); for(int64 X = -1000000000; X < 1000000000; X += 8) { if(f(X) == 0) { if(flag++) cout << " "; cout << X; } if(f(X + 1) == 0) { if(flag++) cout << " "; cout << X + 1; } if(f(X + 2) == 0) { if(flag++) cout << " "; cout << X + 2; } if(f(X + 3) == 0) { if(flag++) cout << " "; cout << X + 3; } if(f(X + 4) == 0) { if(flag++) cout << " "; cout << X + 4; } if(f(X + 5) == 0) { if(flag++) cout << " "; cout << X + 5; } if(f(X + 6) == 0) { if(flag++) cout << " "; cout << X + 6; } if(f(X + 7) == 0) { if(flag++) cout << " "; cout << X + 7; } } cout << endl; }