結果
| 問題 |
No.3012 岩井星人グラフ
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2025-01-25 19:27:09 |
| 言語 | C++23 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
RE
|
| 実行時間 | - |
| コード長 | 437 bytes |
| コンパイル時間 | 3,600 ms |
| コンパイル使用メモリ | 277,316 KB |
| 実行使用メモリ | 6,824 KB |
| 最終ジャッジ日時 | 2025-01-26 00:03:15 |
| 合計ジャッジ時間 | 8,873 ms |
|
ジャッジサーバーID (参考情報) |
judge2 / judge4 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 2 |
| other | AC * 2 RE * 21 |
ソースコード
#include <bits/stdc++.h>
using namespace std;
using ll = long long;
int X, Y;
vector<int> G[550];
int main() {
cin>>X>>Y;
for(int i=0; i<X; i++)G[i].push_back((i+1)%X);
for(int i=0; i<X; i++){
int pre = i*(Y-1)+X;
G[i].push_back(pre);
for(int j=1; j<Y-1; j++)G[pre].push_back(++pre);
}
cout<<X*Y<<" "<<X*Y<<endl;
for(int i=0; i<X*Y; i++)for(int j:G[i]) cout<<i+1<<" "<<j+1<<endl;
}