結果
問題 |
No.3012 岩井星人グラフ
|
ユーザー |
|
提出日時 | 2025-01-25 13:07:16 |
言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 803 bytes |
コンパイル時間 | 2,049 ms |
コンパイル使用メモリ | 197,552 KB |
実行使用メモリ | 16,856 KB |
最終ジャッジ日時 | 2025-01-25 22:33:39 |
合計ジャッジ時間 | 9,434 ms |
ジャッジサーバーID (参考情報) |
judge7 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | WA * 2 |
other | WA * 23 |
ソースコード
#include <bits/stdc++.h> using namespace std; using ll = long long; using ull = unsigned long long; #define rep(a, b, c) for (int a = b; a < (int)c; ++a) vector<int> xm = {-1, 1, 0, 0}; vector<int> ym = {0, 0, 1, -1}; const ll MOD = 998244353; int main() { int n, m; cin >> n >> m; cout << n * m << " " << n * m << endl; vector<vector<int>> graph(n * m); rep(i, 0, n * m) { if (i < n) { graph[i].push_back(i + n); } else if (i < n * m - n) { graph[i].push_back(i + n); } else if (i < n * m - 1) { graph[i].push_back(i + 1); } } rep(i, 0, n * m) { for (int x : graph[i]) { cout << i + 1 << " " << x + 1 << endl; } } }