結果
問題 | No.3012 岩井星人グラフ |
ユーザー |
|
提出日時 | 2025-01-25 12:58:10 |
言語 | C++23 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 42 ms / 2,000 ms |
コード長 | 801 bytes |
コンパイル時間 | 1,243 ms |
コンパイル使用メモリ | 129,788 KB |
実行使用メモリ | 6,824 KB |
最終ジャッジ日時 | 2025-01-25 22:27:42 |
合計ジャッジ時間 | 4,164 ms |
ジャッジサーバーID (参考情報) |
judge8 / judge11 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 2 |
other | AC * 23 |
ソースコード
#include <iostream> #include <algorithm> #include <cassert> #include <cmath> #include <cstdint> #include <numeric> #include <set> #include <unordered_set> #include <map> #include <vector> #include <string> #include <deque> #include <queue> #include <iomanip> using namespace std; using ll = long long; void solve(); int main(void) { cin.tie(nullptr); ios::sync_with_stdio(false); solve(); return 0; } void solve() { ll x, y; cin >> x >> y; const ll n = x * y, m = x * y; cout << n << " " << m << "\n"; for(intmax_t i=0;i<intmax_t(x);i++) { cout << i + 1 << " " << (i + 1) % x + 1 << "\n"; } ll counter = x; for(intmax_t i=0;i<intmax_t(x);i++) { ll c = i; for(intmax_t j=0;j<intmax_t(y-1);j++) { cout << c + 1 << " " << counter + 1 << "\n"; c = counter, counter++; } } }