結果

問題 No.3012 岩井星人グラフ
コンテスト
ユーザー anchuyu
提出日時 2026-01-02 00:57:11
言語 C++17
(gcc 15.2.0 + boost 1.89.0)
結果
WA  
実行時間 -
コード長 452 bytes
記録
記録タグの例:
初AC ショートコード 純ショートコード 純主流ショートコード 最速実行時間
コンパイル時間 1,937 ms
コンパイル使用メモリ 194,604 KB
実行使用メモリ 7,852 KB
最終ジャッジ日時 2026-01-02 00:57:21
合計ジャッジ時間 9,416 ms
ジャッジサーバーID
(参考情報)
judge5 / judge4
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 1 WA * 1
other WA * 23
権限があれば一括ダウンロードができます

ソースコード

diff #
raw source code

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

void print(int i, int j){
  printf("%d %d", i, j);
  cout << endl;
}

int main () {
  int x,y;
  cin >> x >> y;
  
  printf("%d %d\n", x * y, x * y);
  
  for(int i = 1; i <= x * y; i++){
    if(i <= x - 1){
      print(i, i + 1);
      print(i, i + x);
    } else if (i == x){
      print(i, 1);
      print(i, i + x);
    } else if (i < y * (x - 1)){
      print(i, i + x);
    }
  }
  //cout << endl;
}
0