結果
問題 |
No.3012 岩井星人グラフ
|
ユーザー |
![]() |
提出日時 | 2025-02-10 17:44:21 |
言語 | C++23 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 44 ms / 2,000 ms |
コード長 | 509 bytes |
コンパイル時間 | 3,752 ms |
コンパイル使用メモリ | 272,980 KB |
実行使用メモリ | 6,820 KB |
最終ジャッジ日時 | 2025-02-10 17:44:32 |
合計ジャッジ時間 | 10,835 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 2 |
other | AC * 23 |
ソースコード
#include<bits/stdc++.h> using namespace std; #define int long long const int inf = 2000000000000000000; signed main(){ int x,y;cin>>x>>y; int n=x*y; cout<<n<<" "<<n<<"\n"; for(int i=1;i<=x;i++){ if(i<x){ cout<<i<<" "<<i+1<<"\n"; }else{ cout<<i<<" "<<1<<"\n"; } } for(int i=0;i<x;i++){ int f=x+1+(i*(y-1)); cout<<i+1<<" "<<f<<"\n"; for(int j=0;j<y-2;j++){ cout<<f+j<<" "<<f+j+1<<"\n"; } } }