結果
問題 | No.3012 岩井星人グラフ |
ユーザー |
![]() |
提出日時 | 2025-01-25 13:24:10 |
言語 | C++23 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 348 ms / 2,000 ms |
コード長 | 831 bytes |
コンパイル時間 | 3,547 ms |
コンパイル使用メモリ | 279,164 KB |
実行使用メモリ | 5,248 KB |
最終ジャッジ日時 | 2025-01-25 22:45:47 |
合計ジャッジ時間 | 10,856 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge9 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 2 |
other | AC * 23 |
ソースコード
#include <bits/stdc++.h> using namespace std; using ll = long long; #define rep(i,n) for(int i=0;i<n;i++) void iwaig(ll x,ll y) { ll vs = x*y; ll eds = x*y; cout << vs << " " << eds << endl; vector<ll> deg1; vector<ll> deg3; vector<vector<ll>> paths(x); rep(i,x) { ll tmp1 = i * y + 1; ll tmp3 = tmp1 + y - 1; for (int j = tmp1; j <= tmp3; ++j) { paths[i].push_back(j); } deg1.push_back(tmp1); deg3.push_back(tmp3); } rep(i,x) { for (int j = 0; j < y - 1; ++j) { cout << paths[i][j] << " " << paths[i][j + 1] << endl; } } rep(i,x) { cout << deg3[i] << " " << deg3[(i + 1) % x] << endl; } } int main() { int x,y; cin >> x>>y; iwaig(x,y); return 0; }