結果
問題 | No.3012 岩井星人グラフ |
ユーザー |
|
提出日時 | 2025-01-25 12:53:48 |
言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 31 ms / 2,000 ms |
コード長 | 519 bytes |
コンパイル時間 | 2,073 ms |
コンパイル使用メモリ | 191,700 KB |
実行使用メモリ | 6,820 KB |
最終ジャッジ日時 | 2025-01-25 22:25:50 |
合計ジャッジ時間 | 7,280 ms |
ジャッジサーバーID (参考情報) |
judge10 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 2 |
other | AC * 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; int len = y - 2 + 1; while(len >= 1){ cout << pre << ' ' << cur << '\n'; pre = cur; cur++; len--; } } }