結果
| 問題 |
No.690 E869120 and Constructing Array 4
|
| コンテスト | |
| ユーザー |
milanis48663220
|
| 提出日時 | 2019-09-28 16:55:55 |
| 言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 606 bytes |
| コンパイル時間 | 669 ms |
| コンパイル使用メモリ | 55,804 KB |
| 実行使用メモリ | 6,824 KB |
| 最終ジャッジ日時 | 2024-10-02 12:07:59 |
| 合計ジャッジ時間 | 4,125 ms |
|
ジャッジサーバーID (参考情報) |
judge2 / judge4 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | WA * 3 |
| other | WA * 19 |
ソースコード
#include <iostream>
using namespace std;
bool G[33][33];
int main(){
int K;
cin >> K;
int N, M = 0;
N = 32;
for(int i = 2; i <= 32; i++){
for(int j = i+1; j <= 32; j++){
G[i][j] = true;
M++;
}
}
for(int i = 0; i <= 30; i++){
int m = (1<<i);
if(K&m){
G[1][31-i] = true;
M++;
}
}
cout << N << M << endl;
for(int i = 1; i <= 32; i++){
for(int j = i+1; j <= 32; j++){
if(G[i][j]){
cout << i << ' ' << j << endl;
}
}
}
}
milanis48663220