結果
| 問題 |
No.3012 岩井星人グラフ
|
| コンテスト | |
| ユーザー |
北杜
|
| 提出日時 | 2025-01-25 13:02:14 |
| 言語 | C++23 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
AC
|
| 実行時間 | 311 ms / 2,000 ms |
| コード長 | 607 bytes |
| コンパイル時間 | 4,602 ms |
| コンパイル使用メモリ | 312,908 KB |
| 実行使用メモリ | 5,248 KB |
| 最終ジャッジ日時 | 2025-01-25 22:30:38 |
| 合計ジャッジ時間 | 11,446 ms |
|
ジャッジサーバーID (参考情報) |
judge4 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 2 |
| other | AC * 23 |
ソースコード
#define _GLIBCXX_DEBUG
#include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for (int i = 0; i < (ll)(n); i++)
#define all(a) (a).begin(), (a).end()
using ll = long long;
const int INF32 = 2e9;
const ll INF64 = 4e18;
int main() {
int x, y;
cin >> x >> y;
cout << x*y << " " << x*y << endl;
for (int i = 0; i < y-1; i++) {
for (int j = 1; j <= x; j++) {
cout << i*x+j << " " << (i+1)*x+j << endl;
}
}
for (int i = x*(y-1)+1; i < x*y; i++) {
cout << i << " " << i+1 << endl;
}
cout << x*y << " " << x*(y-1)+1 << endl;
return 0;
}
北杜