結果

問題 No.3661 Grid Paint Game
コンテスト
ユーザー GOTKAKO
提出日時 2026-08-30 15:17:36
言語 C++17
(gcc 15.3.0 + boost 1.92.0)
コンパイル:
g++-15 -O2 -lm -std=c++17 -Wuninitialized -DONLINE_JUDGE -o a.out _filename_
実行:
./a.out
結果
WA  
実行時間 -
コード長 798 bytes
記録
記録タグの例:
初AC ショートコード 純ショートコード 純主流ショートコード 最速実行時間
コンパイル時間 1,170 ms
コンパイル使用メモリ 214,476 KB
実行使用メモリ 6,272 KB
最終ジャッジ日時 2026-08-30 15:18:08
合計ジャッジ時間 2,822 ms
ジャッジサーバーID
(参考情報)
judge3_0 / judge1_1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 1
other AC * 1 WA * 7
権限があれば一括ダウンロードができます

ソースコード

diff #
raw source code

#include <bits/stdc++.h>
using namespace std;

void solve(int H,int W){
    vector<vector<int>> C(H,vector<int>(W,-2));
    for(int t=0; ; t++){
        if(t == H) break;
        for(int k=0; k<W; k++) C.at(t).at(k) = 1;
        if(t == W) break;
        for(int i=0; i<H; i++) C.at(i).at(t) = -1;
    }
    int s = 0;
    for(int i=0; i<H; i++) for(int k=0; k<W; k++) s += C.at(i).at(k);
    cout << H << " " << W << "\n"; 
    if(s >= 0) cout << "sepa ";
    else cout << "ryota ";
}

int main(){
    ios_base::sync_with_stdio(false);
    cin.tie(nullptr);
 
    int T; cin >> T;
    while(T--){
        long long H,W; cin >> H >> W;
        if(H == W) cout << "ryota\n";
        else if(H+1 == W) cout << "sepa\n";
        else if(H > W) cout << "ryota\n";
        else cout << "sepa\n";
    }
}
0