結果
問題 | No.3012 岩井星人グラフ |
ユーザー |
![]() |
提出日時 | 2025-01-26 23:03:41 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 354 ms / 2,000 ms |
コード長 | 627 bytes |
コンパイル時間 | 502 ms |
コンパイル使用メモリ | 61,680 KB |
実行使用メモリ | 6,824 KB |
最終ジャッジ日時 | 2025-01-26 23:03:52 |
合計ジャッジ時間 | 7,887 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 2 |
other | AC * 23 |
ソースコード
#include<iostream> using namespace std; int main(){ int x,y; cin >> x >> y; cout << x*y << " " << x*y << endl; for(int i = 0; i < x; i++){ for(int j = 0; j < y; j++){ if(j==y-1 && i == x-1){ cout << i+x*j+1 << " " << i+x*j+1-x+1 << endl; }else if(j==y-1){ cout << i+x*j+1 << " " << i+x*j+1+1 << endl; }else{ cout << i+x*j+1 << " " << i+x*(j+1)+1 << endl; } } } }