結果
| 問題 |
No.3012 岩井星人グラフ
|
| コンテスト | |
| ユーザー |
あいすあうと
|
| 提出日時 | 2025-01-25 14:23:13 |
| 言語 | C++23 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
AC
|
| 実行時間 | 337 ms / 2,000 ms |
| コード長 | 918 bytes |
| コンパイル時間 | 3,126 ms |
| コンパイル使用メモリ | 276,796 KB |
| 実行使用メモリ | 5,248 KB |
| 最終ジャッジ日時 | 2025-01-25 23:17:41 |
| 合計ジャッジ時間 | 10,752 ms |
|
ジャッジサーバーID (参考情報) |
judge8 / judge1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 2 |
| other | AC * 23 |
ソースコード
#include <bits/stdc++.h>
using namespace std;
using ll = long long;
template<typename T> using vc = vector<T>;
template<typename T> using vv = vc<vc<T>>;
using vl = vc<ll>;
using vs = vc<string>;
#define rep(i,n) for(ll i=1;i<(n);i++)
#define pb push_back
#define pob pop_back
#define YES cout<<"Yes"<<endl
#define NO cout<<"No"<<endl
#define YN {cout<<"Yes"<<endl;}else{cout<<"No"<<endl;}
#define M1 cout<<"-1"<<endl
#define INF (ll)4e18
vl dx = {1,-1,0,0};vl dy = {0,0,1,-1};
int main(){
ll x,y;
cin >> x >> y;
cout << x*y << " " << x*y << endl;
rep(i,x){
cout << i << " " << i+1 << endl;
ll bef=i,aft=i+x;
rep(j,y){
cout << bef << " " << aft << endl;
bef=aft;
aft+=x;
}
}
cout << x << " " << 1 << endl;
ll bef=x,aft=x+x;
rep(j,y){
cout << bef << " " << aft << endl;
bef=aft;
aft+=x;
}
}
あいすあうと