結果
問題 | No.3012 岩井星人グラフ |
ユーザー |
|
提出日時 | 2025-01-25 12:53:55 |
言語 | C++23 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 305 ms / 2,000 ms |
コード長 | 1,362 bytes |
コンパイル時間 | 5,061 ms |
コンパイル使用メモリ | 332,852 KB |
実行使用メモリ | 6,820 KB |
最終ジャッジ日時 | 2025-01-25 22:26:23 |
合計ジャッジ時間 | 11,764 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge9 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 2 |
other | AC * 23 |
ソースコード
#include <atcoder/all> #include <bits/stdc++.h> using namespace std; using namespace atcoder; #define OVERLOAD_REP(_1, _2, _3, _4, name, ...) name #define REP1(i, n) for (auto i = std::decay_t<decltype(n)>{}; (i) < (n); ++(i)) #define REP2(i, l, r) for (auto i = (l); (i) < (r); ++(i)) #define REP3(i, l, r, d) for (auto i = (l); (i) < (r); i += (d)) #define rep(...) OVERLOAD_REP(__VA_ARGS__, REP3, REP2, REP1)(__VA_ARGS__) #define all(x) (x).begin(), (x).end() #define rall(x) (x).rbegin(), (x).rend() #define YesNo(b) ((b) ? "Yes" : "No") #define YESNO(b) ((b) ? "YES" : "NO") #define yesno(b) ((b) ? "yes" : "no") using mint = modint998244353; using ull = unsigned long long; using ll = long long; using vi = vector<int>; using vll = vector<ll>; using vb = vector<bool>; using vvi = vector<vi>; using vvll = vector<vll>; using vs = vector<string>; using vvs = vector<vs>; using pii = pair<int, int>; using pll = pair<ll, ll>; using vpii = vector<pii>; const vi dx = {1, 0, -1, 0}; const vi dy = {0, 1, 0, -1}; constexpr int INF = 1 << 30; constexpr ll LINF = 1LL << 60; int main() { ios::sync_with_stdio(false); cin.tie(nullptr); int X, Y; cin >> X >> Y; vi G(X*Y); rep(i, X) G[i] = (i+1)%X; rep(i, X, X*Y) G[i] = i-X; cout << X*Y << " " << X*Y << endl; rep(i, X*Y) cout << i+1 << " " << G[i]+1 << endl; return 0; }