結果

問題 No.1556 Power Equality
コンテスト
ユーザー yansi819
提出日時 2024-03-22 08:49:42
言語 C++17
(gcc 15.2.0 + boost 1.90.0)
コンパイル:
g++-15 -O2 -lm -std=c++17 -Wuninitialized -DONLINE_JUDGE -o a.out _filename_
実行:
./a.out
結果
WA  
実行時間 -
コード長 349 bytes
記録
記録タグの例:
初AC ショートコード 純ショートコード 純主流ショートコード 最速実行時間
コンパイル時間 2,911 ms
コンパイル使用メモリ 273,116 KB
実行使用メモリ 6,528 KB
最終ジャッジ日時 2026-07-04 04:55:18
合計ジャッジ時間 3,873 ms
ジャッジサーバーID
(参考情報)
judge2_1 / judge1_0
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 1 WA * 1
other AC * 4 WA * 5
権限があれば一括ダウンロードができます
コンパイルメッセージ
main.cpp: In function 'int main()':
main.cpp:10:3: warning: 'A' is used uninitialized [-Wuninitialized]
   10 |   if (A == B) cout << "Yes" << endl;
      |   ^~
main.cpp:9:7: note: 'A' was declared here
    9 |   int A, B;
      |       ^
main.cpp:10:3: warning: 'B' is used uninitialized [-Wuninitialized]
   10 |   if (A == B) cout << "Yes" << endl;
      |   ^~
main.cpp:9:10: note: 'B' was declared here
    9 |   int A, B;
      |          ^

ソースコード

diff #
raw source code

#include <bits/stdc++.h>
#include <atcoder/all>
using namespace std;
using namespace atcoder;
using ll = long long;
using ld = long double;

int main() {
  int A, B;
  if (A == B) cout << "Yes" << endl;
  else if (A == 2 && B == 4) cout << "Yes" << endl;
  else if (A == 4 && B == 2) cout << "Yes" << endl;
  else cout << "No" << endl;
  return 0;
}
0