結果
| 問題 | No.1298 OR XOR |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2026-11-14 14:32:55 |
| 言語 | C++23(gcc16) (gcc 16.2.0 + boost 1.92.0 + ACL) |
| 結果 |
WA
不安定
|
| 実行時間 | - |
| コード長 | 431 bytes |
| 記録 | |
| コンパイル時間 | 1,126 ms |
| コンパイル使用メモリ | 178,400 KB |
| 実行使用メモリ | 9,908 KB |
| 最終ジャッジ日時 | 2026-11-14 14:33:43 |
| 合計ジャッジ時間 | 3,149 ms |
|
ジャッジサーバーID (参考情報) |
judge5_0 / judge1_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 1 |
| other | AC * 8 WA * 5 |
ソースコード
#include<iostream>
#include<vector>
#include<algorithm>
using namespace std;
using ll = long long;
int main(void){
int n; cin >> n;
if(__builtin_popcount(n)==1){
printf("-1 -1 -2\n"); return 0;
}
int ans[3]={};
int c=0, x=0;
while(n){
if(n&1){
ans[c]+=(1<<x);
ans[(c+1)%3]+=(1<<x);
c=(c+1)%3;
}
n/=2; x++;
}
cout << ans[0] << ' ' << ans[1] << ' ' << ans[2] << endl;
return 0;
}