結果
| 問題 | No.3012 岩井星人グラフ |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2026-01-02 00:58:54 |
| 言語 | C++17 (gcc 15.2.0 + boost 1.89.0) |
| 結果 |
AC
|
| 実行時間 | 366 ms / 2,000 ms |
| コード長 | 453 bytes |
| 記録 | |
| コンパイル時間 | 1,921 ms |
| コンパイル使用メモリ | 194,604 KB |
| 実行使用メモリ | 7,848 KB |
| 最終ジャッジ日時 | 2026-01-02 00:59:05 |
| 合計ジャッジ時間 | 9,302 ms |
|
ジャッジサーバーID (参考情報) |
judge3 / judge4 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 2 |
| other | AC * 23 |
ソースコード
#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 <= x * (y - 1)){
print(i, i + x);
}
}
//cout << endl;
}