結果
| 問題 | No.3012 岩井星人グラフ |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2025-01-25 12:45:57 |
| 言語 | C++17 (gcc 13.3.0 + boost 1.89.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 656 bytes |
| 記録 | |
| コンパイル時間 | 1,743 ms |
| コンパイル使用メモリ | 191,392 KB |
| 実行使用メモリ | 5,248 KB |
| 最終ジャッジ日時 | 2025-01-25 22:20:23 |
| 合計ジャッジ時間 | 7,004 ms |
|
ジャッジサーバーID (参考情報) |
judge3 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | WA * 2 |
| other | WA * 23 |
ソースコード
#include <bits/stdc++.h>
using namespace std;
int main(){
ios::sync_with_stdio(false);
cin.tie(0);
int x, y;
cin >> x >> y;
int two = x * (y - 2), cur = x + 1;
cout << x * y << ' ' << x * y << '\n';
for(int i = 0; i < x; i++){
cout << i + 1 << ' ' << (i + 1) % x + 1 << '\n';
int pre = i + 1;
if(i == 0){
int len = two + 1;
while(len >= 1){
cout << pre << ' ' << cur << '\n';
pre = cur;
cur++;
len--;
}
}else{
cout << pre << ' ' << cur << '\n';
cur++;
}
}
}