結果
問題 | No.3012 岩井星人グラフ |
ユーザー |
|
提出日時 | 2025-01-25 13:30:06 |
言語 | C++23 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 36 ms / 2,000 ms |
コード長 | 1,163 bytes |
コンパイル時間 | 3,511 ms |
コンパイル使用メモリ | 274,764 KB |
実行使用メモリ | 5,248 KB |
最終ジャッジ日時 | 2025-01-25 22:48:56 |
合計ジャッジ時間 | 10,877 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 2 |
other | AC * 23 |
ソースコード
#include<bits/stdc++.h> using namespace std; using ll = long long; using ld = long double; #define rep(i,n) for(int i=0;i<(n);i++) #define drep(i,n) for(int i=(n)-1;i>=0;i--) #define rrep(i,n) for(int i=1;i<(n);i++) #define Yes cout << "Yes" << endl #define No cout << "No" << endl #define YN {cout << "Yes" << endl;}else{cout << "No" << endl;} #define dame cout << -1 << endl #define nall(a) a.begin(),a.end() #define rall(a) a.rbegin(),a.rend() #define vout(a) {rep(i,(int)a.size()){cout << a[i] << ' ';} cout << endl;} #define vvout(a) rep(i,(int)a.size()){{rep(j,(int)a[i].size()) cout << a[i][j] << ' ';}cout << '\n';} void chmax(auto& x,auto y){x = max(x,y);} void chmin(auto& x,auto y){x = min(x,y);} #define INF 2e9 void pirntf(ld x) {printf("%.10Lf\n",x);} vector<int> dx = {1,0,-1,0}; vector<int> dy = {0,-1,0,1}; #define Mod 998244353 int main(){ int x,y; cin >> x >> y; cout << x*y << ' ' << x*y << '\n'; rrep(i,x+1){ for(int j=i+1;j<x+1;j++){ if((j-i)%x==1){ cout << i << ' ' << j << '\n'; } } if(i==1) cout << i << ' ' << x << '\n'; rrep(j,y){ cout << i+(j-1)*x << ' ' << i+j*x << '\n'; } } }