結果

問題 No.550 夏休みの思い出(1)
ユーザー ei1333333ei1333333
提出日時 2017-07-29 00:15:10
言語 C++14
(gcc 12.3.0 + boost 1.83.0)
結果
WA  
実行時間 -
コード長 939 bytes
コンパイル時間 1,739 ms
コンパイル使用メモリ 168,312 KB
実行使用メモリ 6,824 KB
最終ジャッジ日時 2024-10-10 07:07:53
合計ジャッジ時間 119,291 ms
ジャッジサーバーID
(参考情報)
judge5 / judge4
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 1,966 ms
6,820 KB
testcase_01 AC 1,955 ms
6,816 KB
testcase_02 AC 1,961 ms
6,816 KB
testcase_03 AC 1,954 ms
6,816 KB
testcase_04 AC 1,958 ms
6,816 KB
testcase_05 AC 1,955 ms
6,816 KB
testcase_06 AC 1,958 ms
6,816 KB
testcase_07 AC 1,948 ms
6,816 KB
testcase_08 AC 1,955 ms
6,820 KB
testcase_09 AC 1,947 ms
6,816 KB
testcase_10 AC 1,955 ms
6,820 KB
testcase_11 AC 1,959 ms
6,816 KB
testcase_12 AC 1,957 ms
6,820 KB
testcase_13 AC 1,967 ms
6,820 KB
testcase_14 AC 1,966 ms
6,816 KB
testcase_15 AC 1,957 ms
6,816 KB
testcase_16 AC 1,954 ms
6,820 KB
testcase_17 AC 1,963 ms
6,820 KB
testcase_18 AC 1,969 ms
6,816 KB
testcase_19 AC 1,963 ms
6,816 KB
testcase_20 AC 1,976 ms
6,816 KB
testcase_21 AC 1,962 ms
6,820 KB
testcase_22 AC 1,950 ms
6,816 KB
testcase_23 AC 1,950 ms
6,816 KB
testcase_24 AC 1,952 ms
6,820 KB
testcase_25 AC 1,952 ms
6,816 KB
testcase_26 AC 1,949 ms
6,816 KB
testcase_27 AC 1,950 ms
6,816 KB
testcase_28 AC 1,974 ms
6,820 KB
testcase_29 AC 1,964 ms
6,816 KB
testcase_30 AC 1,954 ms
6,820 KB
testcase_31 AC 1,953 ms
6,820 KB
testcase_32 AC 1,955 ms
6,816 KB
testcase_33 AC 1,967 ms
6,824 KB
testcase_34 AC 1,970 ms
6,820 KB
testcase_35 AC 1,965 ms
6,816 KB
testcase_36 AC 1,962 ms
6,816 KB
testcase_37 AC 1,973 ms
6,816 KB
testcase_38 AC 1,960 ms
6,816 KB
testcase_39 AC 1,967 ms
6,820 KB
testcase_40 AC 1,966 ms
6,820 KB
testcase_41 AC 1,954 ms
6,816 KB
testcase_42 AC 1,965 ms
6,820 KB
testcase_43 AC 1,971 ms
6,820 KB
testcase_44 AC 1,947 ms
6,820 KB
testcase_45 AC 1,976 ms
6,820 KB
testcase_46 AC 1,968 ms
6,820 KB
testcase_47 AC 1,962 ms
6,820 KB
testcase_48 AC 1,967 ms
6,816 KB
testcase_49 AC 1,950 ms
6,816 KB
testcase_50 AC 1,954 ms
6,820 KB
testcase_51 AC 1,981 ms
6,820 KB
testcase_52 WA -
testcase_53 WA -
testcase_54 WA -
testcase_55 WA -
testcase_56 WA -
testcase_57 WA -
権限があれば一括ダウンロードができます
コンパイルメッセージ
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 << " ";
      |          ^~~~

ソースコード

diff #

#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);
  };

  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;
}
0