結果

問題 No.5025 Forest Fire
コンテスト
ユーザー yuunegi
提出日時 2026-10-24 15:16:33
言語 C++23
(gcc 15.3.0 + boost 1.92.0 + ACL)
コンパイル:
g++-15 -O2 -lm -std=c++23 -Wuninitialized -DONLINE_JUDGE -o a.out _filename_
実行:
./a.out
結果
AC  
実行時間 1 ms / 2,000 ms
+ 960µs
コード長 550 bytes
記録
記録タグの例:
初AC ショートコード 純ショートコード 純主流ショートコード 最速実行時間
コンパイル時間 2,522 ms
コンパイル使用メモリ 342,300 KB
実行使用メモリ 9,924 KB
スコア 155,234,569
最終ジャッジ日時 2026-10-24 15:17:31
合計ジャッジ時間 57,611 ms
ジャッジサーバーID
(参考情報)
judge6_0 / <nil>
純コード判定しない問題か言語
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 50
権限があれば一括ダウンロードができます

ソースコード

diff #
raw source code

#include <bits/stdc++.h>
using namespace std;
int main(void){
    const int n=50,k=100;
    int g;
    cin>>g>>g;
    vector<string>s(n);
    for(int i=0;i<n;i++){
        cin>>s[i];
    }
    vector<array<int,2>>ans;
    for(int i=0;i<n;i++){
        if(s[i][i]!='0')ans.push_back({i,i});
        if(s[i][n-i-1]!='0')ans.push_back({i,n-i-1});
    }
    sort(ans.begin(), ans.end());
    ans.erase(unique(ans.begin(), ans.end()), ans.end());
    cout<<ans.size()<<endl;
    for(auto x:ans){
        cout<<x[0]<<" "<<x[1]<<endl;
    }
    return 0;
}
0