結果
| 問題 |
No.3012 岩井星人グラフ
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2025-02-02 10:01:40 |
| 言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 860 bytes |
| コンパイル時間 | 5,627 ms |
| コンパイル使用メモリ | 163,016 KB |
| 実行使用メモリ | 34,568 KB |
| 最終ジャッジ日時 | 2025-02-02 10:01:53 |
| 合計ジャッジ時間 | 9,605 ms |
|
ジャッジサーバーID (参考情報) |
judge2 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | WA * 2 |
| other | WA * 23 |
ソースコード
#include<bits/stdc++.h>
using namespace std;
typedef long long ll;
#define P pair<ll,ll>
#define pub push_back
#define pob pop_back
#define mp make_pair
#define nl '\n' //new line
#define mset multiset
#define lb lower_bound
#define rep(i,n) for(ll i=0;i<(ll)(n);++i)
template<typename T> bool chmin(T& a,T b){if(a>b){a=b;return true;}return false;}
template<typename T> bool chmax(T& a,T b){if(a<b){a=b;return true;}return false;}
const int num=10'000'09; //2*10^5+9
const int INF=1'000'000'000; //10^9
vector<ll> g[num];
void con(ll x,ll y){
g[x].pub(y); g[y].pub(x);
}
int main(){
ll x,y; cin>>x>>y;
for(int i=1;i<=x;++i){
if(i==x) con(1,i);
else con(i,i+1);
}
for(int i=x+1;i<=x*y;++i){
con(i,i-x);
}
cout<<x*y<<' '<<x*y<<nl;
for(int i=1;i<=x*y;++i){
for(int j=0;j<g[i].size();++j){
cout<<i<<' '<<g[i][j]<<nl;
}
}
}