結果
| 問題 |
No.638 Sum of "not power of 2"
|
| コンテスト | |
| ユーザー |
vjudge1
|
| 提出日時 | 2025-02-24 11:24:47 |
| 言語 | C++23 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
AC
|
| 実行時間 | 2 ms / 1,000 ms |
| コード長 | 9,618 bytes |
| コンパイル時間 | 3,145 ms |
| コンパイル使用メモリ | 274,072 KB |
| 実行使用メモリ | 6,820 KB |
| 最終ジャッジ日時 | 2025-02-24 11:24:51 |
| 合計ジャッジ時間 | 3,894 ms |
|
ジャッジサーバーID (参考情報) |
judge2 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 2 |
| other | AC * 12 |
ソースコード
/*
@author : LEOmnel_CHEEMSsi_420
AGUANTE CORAZON, AGUANTE
SOMOS TODOS MONTIEL!!!!
EL DIBU MARTINEZ !!!!!
HABIA QUE CREER CARAJO NOMAS !!!!!
La cumbia de los Cheems :v
....
Viene el fin de semana, todo' a la cancha vamos a ir
Est todo preparado, el bombo y el trapo para salir
Al equipo que tiene ms aguante
Lo llevo dentro del corazn
Saltando, cantando, prendidos a los trapos
Dejamos el almaaaaaaa.... en el score
dale dale Cheems! dale Cheeeeeeeemmmsss !!!!!
----------------------------------------------------------------
Pal MbapCheems:
Escuchen, corran la bola
juegan en Francia pero son todos de Angola
Que lindo eeees van a correeer
son cometrabas como el puto de Mbappe
Su vieja es nigeriana
Su viejo camerunes
Pero en el documento.... nacionalidad frances
----------------------------------------------------------------
EL MESSIas <3 <3 <3 <3 <3 <3 <3 <3 <3 <3 <3 <3 <3 <3 <3 <3 <3 <3 <3 <3 <3 <3
??????????????????????????????????????????????????????????????????????????
??????????????????????????????????????????????????????????????????????????
??????????????????????????????????????????????????????????????????????????
??????????????????????????????????????????????????????????????????????????
??????????????????????????????????????????????????????????????????????????
??????????????????????????????????????????????????????????????????????????
??????????????????????????????????????????????????????????????????????????
??????????????????????????????????????????????????????????????????????????
??????????????????????????????????????????????????????????????????????????
??????????????????????????????????????????????????????????????????????????
??????????????????????????????????????????????????????????????????????????
??????????????????????????????????????????????????????????????????????????
??????????????????????????????????????????????????????????????????????????
??????????????????????????????????????????????????????????????????????????
??????????????????????????????????????????????????????????????????????????
??????????????????????????????????????????????????????????????????????????
??????????????????????????????????????????????????????????????????????????
??????????????????????????????????????????????????????????????????????????
??????????????????????????????????????????????????????????????????????????
??????????????????????????????????????????????????????????????????????????
??????????????????????????????????????????????????????????????????????????
??????????????????????????????????????????????????????????????????????????
??????????????????????????????????????????????????????????????????????????
??????????????????????????????????????????????????????????????????????????
??????????????????????????????????????????????????????????????????????????
??????????????????????????????????????????????????????????????????????????
??????????????????????????????????????????????????????????????????????????
??????????????????????????????????????????????????????????????????????????
??????????????????????????????????????????????????????????????????????????
??????????????????????????????????????????????????????????????????????????
??????????????????????????????????????????????????????????????????????????
??????????????????????????????????????????????????????????????????????????
??????????????????????????????????????????????????????????????????????????
??????????????????????????????????????????????????????????????????????????
??????????????????????????????????????????????????????????????????????????
??????????????????????????????????????????????????????????????????????????
??????????????????????????????????????????????????????????????????????????
??????????????????????????????????????????????????????????????????????????
???????????????????????????????????????????????????????????????
?
Q.E.P.D Cheemsito :'v
??????????????????????????????????????????
??????????????????????????????????????????
??????????????????????????????????????????
??????????????????????????????????????????
??????????????????????????????????????????
??????????????????????????????????????????
??????????????????????????????????????????
??????????????????????????????????????????
??????????????????????????????????????????
??????????????????????????????????????????
??????????????????????????????????????????
??????????????????????????????????????????
??????????????????????????????????????????
??????????????????????????????????????????
??????????????????????????????????????????
??????????????????????????????????????????
??????????????????????????????????????????
??????????????????????????????????????????
??????????????????????????????????????????
??????????????????????????????????????????
??????????????????????????????????????????
??????????????????????????????????????????
??????????????????????????????????????????
??????????????????????????????????????????
??????????????????????????????????????????
??????????????????????????????????????????
??????????????????????????????????????????
??????????????????????????????????????????
??????????????????????????????????????????
??????????????????????????????????????????
*/
#include <iostream>
#include <bits/stdc++.h>
using namespace std;
typedef long long int ll;
typedef unsigned long long int ull;
#define pb push_back
#define pf push_front
#define lb lower_bound
#define ub upper_bound
#define all(v) v.begin(),v.end()
#define rall(v) v.rbegin(),v.rend()
#define ii pair<int,int>
#define iii pair<int, ii>
#define iiii pair<ii,ii>
/*
#define typeOfData ii
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>
#define ordered_set tree<typeOfData, null_type,less<typeOfData>, rb_tree_tag,tree_order_statistics_node_update>
using namespace __gnu_pbds;
*/
#define LINE if(debug) { cerr << " ------------------------------------------ " << endl; }
#define debug1(A) if(debug) { cerr << "? " << #A << " : " << A << endl; }
#define debug2(A, B) if(debug) { cerr << "? [ " << #A << " = " << A << " | " << #B << " = " << B << " ]" << endl; }
#define debug3(A, B, C) if(debug) { cerr << "? [ " << #A << " = " << A << " | " << #B << " = " << B << " | " << #C << " = " << C << " ]" << endl; }
#define debug4(A, B, C, D) if(debug) { cerr << "? [ " << #A << " = " << A << " | " << #B << " = " << B << " | " << #C << " = " << C << " | " << #D << " = " << D << " ]" << endl; }
#define debugPair(a) if(debug) { cerr << "? " << #a << ": ( " << a.first << " , " << a.second << " )" << endl; }
#define debugList(A) if(debug) { cerr << "? " << #A << ": "; if(debug) { bool leonelCheems = 0; cerr << "[ "; for(auto x : A) { if(!leonelCheems) cerr << x , leonelCheems = 1; else cerr << " , " << x ;} cerr << " ]" << endl; } }
#define printList(A) { bool leonelCheems = 0; for(auto x : A) { if(!leonelCheems) {cout << x; leonelCheems = 1;}else {cout << " " << x;}} cout << endl; }
#define debugIterablePairs(P) if(debug) { cerr << "? " << #P << " : "; cerr << "{ " << endl; for(auto it : P) { cerr << " " << it.first << " -> " << it.second << endl; } cerr << "} " << endl; }
#define debugGraph(GP) if(debug) { cerr << "? " << #GP << " = "; cerr << "{ " << endl; int cntNodes = 0; for(vi adj : GP) { if(adj.size()) { cerr << " "; cerr << cntNodes << " => "; debugList(adj) } cntNodes ++;} cerr << "}" << endl;}
#define debugGraphWeight(GP) if(debug) { cerr << "? " << #GP << " = {" << endl; int cntNodes = 0; for(auto it : GP ){ if( it.size() ){ cerr << cntNodes << " => [ "; for(auto iter : it){ cerr << iter.first << "-w{" << iter.second << "} "; } cerr << "]" << endl; } cntNodes++; } }
#define debugMatrix(arr,F, C) if(debug) { cerr << "? " << #arr << endl; for(int i = 0 ; i < F ; i++){ cerr << "[ "; for(int j = 0 ; j < C ; j++){ cerr << arr[i][j] << " "; } cerr << "]" << endl;} }
#define executeTime cerr << "Time elapsed: " << 1.0 * clock() / CLOCKS_PER_SEC << " s.\n";
#define FOR(i, l, r) for(int i = l; i < r ; i ++)
#define endl '\n';
#define SZ(A) (int)A.size()
typedef vector<int> vi;
typedef vector<ii> vii;
typedef vector<ll> vll;
const int N = 1e5 + 9;
const int mod = 1e9 + 7;
const int inf = 2e9 + 9;
const ll modL = 1e9 + 7;
const ll infL = 2e18 + 9;
const double pi = acos(-1);
/*
int Kx[8] = {1, 2, 2, 1, -1, -2, -2, -1};
int Ky[8] = {-2, -1, 1, 2, 2, 1, -1, -2};
int X[8] = {-1, 0, 1, 0, -1, 1, 1, -1};
int Y[8] = {0, 1, 0, -1, 1, 1, -1, -1};
*/
// si no vas por todo, anda pa ash bobo
// mirame a la cara, lo siento pero te como hermano * bailecito *
void init();
bool debug = { 1 };
void cumbia420PaLosCheems(int testCase) { /* ESTA VA POR CHEEMSITO :'v */
ll n; cin >> n;
for(ll bit1 = 0; bit1 < 63; bit1 ++) {
for(ll bit2 = bit1 + 1; bit2 < 63; bit2 ++) {
ll num = (1LL << bit1) + (1LL << bit2);
if(num < n) {
ll p = n - num;
if(__builtin_popcount(p) > 1) {
cout << min(num, p) << " " << max(num, p) << endl; return;
}
}
}
}
cout << -1 << endl; return;
}
int main() {
cin.tie(0); ios_base::sync_with_stdio(0);
init();
int t = 1;
//cin >> t;
FOR(i, 1, t + 1) cumbia420PaLosCheems(i);
return 0;
}
void init() {
// srand(time(0));
//freopen("ccski.in", "r", stdin);
//freopen("ccski.out", "w", stdout);
if(debug)
cerr << "mira que te como hermanoo !!! " << endl;
}
vjudge1