結果

問題 No.3012 岩井星人グラフ
ユーザー shingo0909
提出日時 2025-01-25 13:07:32
言語 C++23
(gcc 13.3.0 + boost 1.87.0)
結果
AC  
実行時間 322 ms / 2,000 ms
コード長 456 bytes
コンパイル時間 3,223 ms
コンパイル使用メモリ 273,932 KB
実行使用メモリ 6,820 KB
最終ジャッジ日時 2025-01-25 22:33:59
合計ジャッジ時間 10,451 ms
ジャッジサーバーID
(参考情報)
judge11 / judge4
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 2
other AC * 23
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <bits/stdc++.h>
#include <cstdlib>
#include <math.h>
using namespace std;

using ll = long long;

int main(){
    int x,y;
    cin >> x >> y;
    cout << x*y <<" "<< x*y << endl;
    cout << (x-1)*y+1 <<" " << 1 << endl;
    for(int i=0;i<x;i++){
        if(i!=0){
            cout << (i-1)*y +1 << " " <<i*y+1<< endl;
        }
        for(int j=0;j<y-1;j++){
            cout << i*y+j+1 << " " << i*y+j+2 << endl;
        }
    }
    return 0;
}
0