結果

問題 No.851 テストケース
ユーザー rsk0315
提出日時 2019-07-26 23:56:09
言語 C++17
(gcc 13.3.0 + boost 1.87.0)
結果
AC  
実行時間 3 ms / 3,153 ms
コード長 260 bytes
コンパイル時間 481 ms
コンパイル使用メモリ 49,536 KB
最終ジャッジ日時 2025-01-07 08:58:51
ジャッジサーバーID
(参考情報)
judge5 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 20
権限があれば一括ダウンロードができます
コンパイルメッセージ
main.cpp: In function ‘int main()’:
main.cpp:8:8: warning: ignoring return value of ‘int scanf(const char*, ...)’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
    8 |   scanf("3%jd%c%jd %jd", &x, &c, &y, &z);
      |   ~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

ソースコード

diff #

#include <cstdio>
#include <cstdint>
#include <set>

int main() {
  intmax_t x, y, z;
  char c;
  scanf("3%jd%c%jd %jd", &x, &c, &y, &z);

  if (c == ' ') return puts("\"assert\""), 0;
  std::set<intmax_t> s{x+y, y+z, z+x};
  printf("%jd\n", *++s.rbegin());
}
0