結果
| 問題 |
No.690 E869120 and Constructing Array 4
|
| ユーザー |
ats5515
|
| 提出日時 | 2018-05-18 22:53:37 |
| 言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
| 結果 |
AC
|
| 実行時間 | 3 ms / 1,000 ms |
| コード長 | 795 bytes |
| コンパイル時間 | 852 ms |
| コンパイル使用メモリ | 84,852 KB |
| 実行使用メモリ | 6,944 KB |
| 最終ジャッジ日時 | 2024-06-28 13:56:41 |
| 合計ジャッジ時間 | 1,667 ms |
|
ジャッジサーバーID (参考情報) |
judge5 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 19 |
ソースコード
#include <iostream>
#include <vector>
#include <map>
#include <set>
#include <queue>
#include <string>
#include <iomanip>
#include <algorithm>
#include <cmath>
#include <stdio.h>
using namespace std;
#define int long long
int MOD = 1000000007;
signed main() {
cin.tie(0);
ios::sync_with_stdio(false);
int N;
cin >> N;
int a = 0;
int n = N;
vector < pair<int, int> > res;
a = 2;
int k = 31 * 15;
while (n > 0) {
if (n % 2 == 1) {
k++;
res.emplace_back(a, 32);
}
n /= 2;
a++;
}
cout << 32 << " " << k << endl;
int z = 0;
for (int i = 1; i <= 31; i++) {
for (int j = i + 1; j <= 31; j++) {
cout << i << " " << j << endl;
z++;
}
}
for (int i = 0; i < res.size(); i++) {
cout << res[i].first << " " << res[i].second << endl;
z++;
}
//cout << z << endl;
}
ats5515