結果
| 問題 | No.638 Sum of "not power of 2" |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2026-02-06 23:24:38 |
| 言語 | C++14 (gcc 15.2.0 + boost 1.89.0) |
| 結果 |
AC
|
| 実行時間 | 2 ms / 1,000 ms |
| コード長 | 271 bytes |
| 記録 | |
| コンパイル時間 | 900 ms |
| コンパイル使用メモリ | 74,916 KB |
| 実行使用メモリ | 7,844 KB |
| 最終ジャッジ日時 | 2026-02-06 23:24:41 |
| 合計ジャッジ時間 | 1,989 ms |
|
ジャッジサーバーID (参考情報) |
judge2 / judge1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 2 |
| other | AC * 12 |
ソースコード
#include<iostream>
#include<cassert>
using namespace std;
int main()
{
ios::sync_with_stdio(false);
cin.tie(nullptr);
long N;cin>>N;
for(long a=1;a<N;a++)
{
long b=N-a;
if((a&-a)!=a&&(b&-b)!=b)
{
cout<<a<<" "<<b<<endl;
return 0;
}
}
cout<<-1<<endl;
}