結果
問題 |
No.690 E869120 and Constructing Array 4
|
ユーザー |
![]() |
提出日時 | 2024-10-24 16:56:38 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 603 bytes |
コンパイル時間 | 1,986 ms |
コンパイル使用メモリ | 172,256 KB |
実行使用メモリ | 6,948 KB |
最終ジャッジ日時 | 2024-10-24 16:56:44 |
合計ジャッジ時間 | 5,566 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | WA * 3 |
other | WA * 19 |
ソースコード
#include<bits/stdc++.h> using namespace std ; typedef long long ll ; const int maxn = 1e6 + 7 ; ll n ; vector < pair < ll , ll > > q ; int main(){ ios :: sync_with_stdio(0) ; cin.tie(0) ; cout.tie(0) ; cin >> n ; for(int i = 0 ; i < 62 ; i ++){ for(int j = i + 1 ; j < 62 ; j ++){ q.push_back({i , j}) ; } } for(int i = 0 ; i < 62 ; i ++){ ll x = (n >> i) & 1 ; if(x) q.push_back({i + 1 , 61}) ; } cout << 62 << " " << (int)q.size() << endl ; for(int i = 0 ; i < (int)q.size() ; i ++){ cout << q[i].first + 1 << " " << q[i].second + 1 << endl ; } cout << endl ; return 0 ; }