結果

問題 No.5025 Forest Fire
コンテスト
ユーザー butsurizuki
提出日時 2026-10-22 19:51:40
言語 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  
実行時間 2 ms / 2,000 ms
+ 68µs
コード長 493 bytes
記録
記録タグの例:
初AC ショートコード 純ショートコード 純主流ショートコード 最速実行時間
コンパイル時間 2,214 ms
コンパイル使用メモリ 339,132 KB
実行使用メモリ 9,928 KB
スコア 155,234,569
最終ジャッジ日時 2026-10-24 14:44:30
合計ジャッジ時間 58,136 ms
ジャッジサーバーID
(参考情報)
judge1_0 / <nil>
純コード判定しない問題か言語
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 50
権限があれば一括ダウンロードができます

ソースコード

diff #
raw source code

#include<bits/stdc++.h>

using namespace std;

int main(){
  ios::sync_with_stdio(false);
  cin.tie(nullptr);
  int n,m;
  cin >> n >> m;
  vector<string> s(n);
  for(auto &nx : s){cin >> nx;}
  vector<pair<int,int>> vp;
  for(int i=0;i<50;i++){
    if(s[i][i]!='0'){vp.push_back({i,i});}
  }
  for(int i=0;i<50;i++){
    if(s[i][49-i]!='0'){vp.push_back({i,49-i});}
  }
  
  cout << vp.size() << "\n";
  for(auto &nx : vp){
    cout << nx.first << " " << nx.second << "\n";
  }
  return 0;
}
0