結果
| 問題 | No.638 Sum of "not power of 2" |
| コンテスト | |
| ユーザー |
beet
|
| 提出日時 | 2018-01-26 22:23:02 |
| 言語 | C++11 (gcc 15.3.0 + boost 1.92.0) |
| 結果 |
AC
不安定
|
| 実行時間 | 1 ms / 1,000 ms |
| + 221µs | |
| コード長 | 296 bytes |
| 記録 | |
| コンパイル時間 | 809 ms |
| コンパイル使用メモリ | 179,176 KB |
| 実行使用メモリ | 7,852 KB |
| 最終ジャッジ日時 | 2026-10-09 13:02:57 |
| 合計ジャッジ時間 | 1,846 ms |
|
ジャッジサーバーID (参考情報) |
judge2_1 / judge1_1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 2 |
| other | AC * 12 |
ソースコード
#include<bits/stdc++.h>
using namespace std;
using Int = long long;
signed main(){
Int n;
cin>>n;
for(Int i=1;i<n;i++){
Int x=i,y=n-i;
if(__builtin_popcountll(x)!=1&&__builtin_popcountll(y)!=1){
cout<<x<<" "<<y<<endl;
return 0;
}
}
cout<<-1<<endl;
return 0;
}
beet