結果

問題 No.1298 OR XOR
ユーザー nanashidenkinanashidenki
提出日時 2020-11-27 22:05:59
言語 C++14
(gcc 12.3.0 + boost 1.83.0)
結果
WA  
実行時間 -
コード長 432 bytes
コンパイル時間 1,467 ms
コンパイル使用メモリ 163,828 KB
実行使用メモリ 8,752 KB
最終ジャッジ日時 2023-10-01 06:02:51
合計ジャッジ時間 5,570 ms
ジャッジサーバーID
(参考情報)
judge15 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 WA -
testcase_01 AC 1 ms
4,380 KB
testcase_02 AC 1 ms
4,376 KB
testcase_03 WA -
testcase_04 TLE -
testcase_05 -- -
testcase_06 -- -
testcase_07 -- -
testcase_08 -- -
testcase_09 -- -
testcase_10 -- -
testcase_11 -- -
testcase_12 -- -
testcase_13 -- -
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <bits/stdc++.h>
using namespace std;
#define rep(i,n) for (int i = 0; i < (n); ++i)
using ll = long long;
using P = pair<int,int>;

int main() {
  int N, A = -1, B = -1, C = -1;
  cin >> N;
  rep(i,N) rep(j,N) rep(k,N) {
    {
      {
        if(i|j == N && j|k == N && k|i == N && i ^ j ^ k == 0) {
          A = i;
          B = j;
          C = k;
        }
      }
    }
  }
  cout << A << B << C << endl;
  return 0;
}
0