結果

問題 No.1298 OR XOR
ユーザー shu8Creamshu8Cream
提出日時 2020-11-29 00:46:51
言語 C++17
(gcc 12.3.0 + boost 1.83.0)
結果
TLE  
実行時間 -
コード長 543 bytes
コンパイル時間 1,889 ms
コンパイル使用メモリ 198,708 KB
実行使用メモリ 8,704 KB
最終ジャッジ日時 2023-10-11 02:05:59
合計ジャッジ時間 5,868 ms
ジャッジサーバーID
(参考情報)
judge15 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 2 ms
8,704 KB
testcase_01 AC 1 ms
4,352 KB
testcase_02 AC 2 ms
4,348 KB
testcase_03 AC 1 ms
4,348 KB
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++)
#define Rep(i,init,n) for (int i=init; i<(n); i++)
using ll = long long;
using P = pair<int, int>;
using vi = vector<int>;
using vvi = vector<vi>;
using Graph = vvi;

int main(){
  int n;
  cin >> n;
  Rep(a,1,n+1){
    Rep(b,1,n+1){
      Rep(c,1,n+1){
        if((a|b)==(b|c) && (b|c)==(c|a) && (c|a)==n && (a^b^c)==0){
          cout << a << " " << b << " " << c << endl;
          return 0;
        }
      }
    }
  }
  cout << "-1 -1 -1" << endl;
}
0