結果

問題 No.3012 岩井星人グラフ
ユーザー applejam
提出日時 2025-01-25 12:48:47
言語 C++14
(gcc 13.3.0 + boost 1.87.0)
結果
AC  
実行時間 312 ms / 2,000 ms
コード長 653 bytes
コンパイル時間 2,886 ms
コンパイル使用メモリ 132,508 KB
実行使用メモリ 5,248 KB
最終ジャッジ日時 2025-01-25 22:22:21
合計ジャッジ時間 9,107 ms
ジャッジサーバーID
(参考情報)
judge7 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 2
other AC * 23
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <iostream>
#include <vector>
#include <algorithm>
#include <atcoder/all>
using namespace std;
using namespace atcoder;
using ll = long long;
using mint = modint998244353;
#define rep(i, n) for (int i = 0; i< (int)(n); i++) 

int main(){
    ios::sync_with_stdio(false);
    std::cin.tie(nullptr);
    int x, y; cin >> x >> y;
    cout << x*y << " " << x*y << endl;
    rep(i, x){
        cout << i+1 << " " << (i+2 <= x ? i+2 : 1)<< endl;
    }
    int cnt = x+1;
    rep(i, x){
        int now = i+1;
        rep(j, y-1){
            cout << now << " " << cnt << endl;
            now = cnt;
            cnt++;
        }
    }

    return 0;
}
0