結果

問題 No.678 2Dシューティングゲームの必殺ビーム
ユーザー SSRSSSRS
提出日時 2021-12-18 18:56:54
言語 C++14
(gcc 12.3.0 + boost 1.83.0)
結果
WA  
実行時間 -
コード長 749 bytes
コンパイル時間 2,234 ms
コンパイル使用メモリ 169,520 KB
実行使用メモリ 11,736 KB
最終ジャッジ日時 2023-10-13 18:00:18
合計ジャッジ時間 2,906 ms
ジャッジサーバーID
(参考情報)
judge13 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 10 ms
11,464 KB
testcase_01 AC 11 ms
11,484 KB
testcase_02 AC 10 ms
11,424 KB
testcase_03 AC 11 ms
11,480 KB
testcase_04 AC 11 ms
11,484 KB
testcase_05 AC 9 ms
11,496 KB
testcase_06 AC 9 ms
11,480 KB
testcase_07 WA -
testcase_08 WA -
testcase_09 WA -
testcase_10 WA -
testcase_11 WA -
testcase_12 WA -
testcase_13 WA -
testcase_14 AC 10 ms
11,468 KB
testcase_15 AC 9 ms
11,496 KB
testcase_16 AC 10 ms
11,544 KB
testcase_17 WA -
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <bits/stdc++.h>
using namespace std;
int main(){
  int N, xLB, xRB;
  cin >> N >> xLB >> xRB;
  xLB--;
  vector<int> XL(N), YU(N), XR(N), YD(N);
  for (int i = 0; i < N; i++){
    cin >> XL[i] >> YU[i] >> XR[i] >> YD[i];
    XL[i]--;
    YU[i]--;
  }
  vector<vector<int>> id(1280, vector<int>(1680, -1));
  for (int i = 0; i < N; i++){
    for (int j = max(XL[i], 0); j < min(XR[i], 1280); j++){
      for (int k = max(YU[i], 0); k < min(YD[i], 1680); k++){
        id[j][k] = i;
      }
    }
  }
  vector<int> H(N, 0);
  for (int i = 0; i < 1280; i++){
    for (int j = 1679; j >= 0; j--){
      if (id[i][j] != -1){
        H[id[i][j]] = 1;
        break;
      }
    }
  }
  for (int i = 0; i < N; i++){
    cout << H[i] << endl;
  }
}
0