結果

問題 No.2112 All 2x2 are Equal
ユーザー HaaHaa
提出日時 2022-10-28 21:57:30
言語 C++14
(gcc 13.2.0 + boost 1.83.0)
結果
WA  
実行時間 -
コード長 787 bytes
コンパイル時間 2,034 ms
コンパイル使用メモリ 170,192 KB
実行使用メモリ 11,164 KB
最終ジャッジ日時 2023-09-20 04:52:40
合計ジャッジ時間 7,778 ms
ジャッジサーバーID
(参考情報)
judge12 / judge13
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 2 ms
4,380 KB
testcase_01 AC 2 ms
4,380 KB
testcase_02 AC 4 ms
4,376 KB
testcase_03 AC 3 ms
4,376 KB
testcase_04 WA -
testcase_05 AC 43 ms
7,192 KB
testcase_06 AC 74 ms
10,492 KB
testcase_07 AC 24 ms
5,516 KB
testcase_08 AC 59 ms
9,012 KB
testcase_09 WA -
testcase_10 AC 28 ms
5,560 KB
testcase_11 AC 20 ms
4,812 KB
testcase_12 WA -
testcase_13 AC 65 ms
9,704 KB
testcase_14 WA -
testcase_15 WA -
testcase_16 AC 1 ms
4,376 KB
testcase_17 AC 59 ms
8,804 KB
testcase_18 AC 3 ms
4,376 KB
testcase_19 AC 6 ms
4,380 KB
testcase_20 WA -
testcase_21 WA -
testcase_22 WA -
testcase_23 AC 4 ms
4,380 KB
testcase_24 AC 8 ms
4,376 KB
testcase_25 AC 11 ms
4,376 KB
testcase_26 AC 8 ms
4,380 KB
testcase_27 WA -
testcase_28 WA -
testcase_29 AC 6 ms
4,380 KB
testcase_30 AC 24 ms
5,480 KB
testcase_31 AC 44 ms
7,192 KB
testcase_32 AC 79 ms
10,916 KB
testcase_33 AC 78 ms
11,164 KB
testcase_34 WA -
testcase_35 AC 78 ms
10,920 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <bits/stdc++.h>
using namespace std;
typedef long long int ll;
typedef pair<ll,ll> P;
typedef vector<ll> VI;
typedef vector<VI> VVI;
#define REP(i,n) for(int i=0;i<(n);i++)
#define ALL(v) v.begin(),v.end()
template<typename T> bool chmax(T &x, const T &y) {return (x<y)?(x=y,true):false;};
template<typename T> bool chmin(T &x, const T &y) {return (x>y)?(x=y,true):false;};
constexpr ll MOD=998244353;
constexpr ll INF=2e18;

int main(){
    int h, w; cin >> h >> w;
    VVI ans(h+1,VI(w));
    int l=1, r=h*w;
    REP(i,(h+1)/2){
        REP(j,w){
            int x=j%2==1;
            int y=j%2==0;
            ans[i*2+x][j]=l++;
            ans[i*2+y][j]=r--;
        }
    }
    cout << "Yes" << endl;
    REP(i,h)REP(j,w) cout << ans[i][j] << " \n"[j==w-1];
    return 0;
}
0