結果
問題 | No.3012 岩井星人グラフ |
ユーザー |
|
提出日時 | 2025-01-03 21:32:28 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 345 ms / 2,000 ms |
コード長 | 312 bytes |
コンパイル時間 | 2,829 ms |
コンパイル使用メモリ | 160,096 KB |
実行使用メモリ | 5,248 KB |
最終ジャッジ日時 | 2025-01-25 22:13:27 |
合計ジャッジ時間 | 8,682 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge7 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 2 |
other | AC * 23 |
ソースコード
#include <bits/stdc++.h> using namespace std; typedef long long ll; int main(){ ll X,Y; cin>>X>>Y; cout <<X*Y<<" "<<X*Y<<endl; for(int i=0;i<X;i++){ for(int j=0;j<Y-1;j++){ cout <<i*Y+j+1<<" "<<i*Y+j+2<<endl; } cout <<i*Y+1<<" "<<(i*Y+Y)%(X*Y)+1<<endl; } }