結果

問題 No.678 2Dシューティングゲームの必殺ビーム
ユーザー tetsutetsu
提出日時 2018-04-28 01:32:59
言語 C++14
(gcc 12.3.0 + boost 1.83.0)
結果
WA  
実行時間 -
コード長 786 bytes
コンパイル時間 1,644 ms
コンパイル使用メモリ 171,028 KB
実行使用メモリ 11,924 KB
最終ジャッジ日時 2023-09-10 07:40:44
合計ジャッジ時間 2,803 ms
ジャッジサーバーID
(参考情報)
judge11 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 7 ms
11,872 KB
testcase_01 AC 7 ms
11,756 KB
testcase_02 AC 7 ms
11,924 KB
testcase_03 AC 7 ms
11,756 KB
testcase_04 AC 7 ms
11,696 KB
testcase_05 AC 6 ms
11,780 KB
testcase_06 AC 6 ms
11,704 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 6 ms
11,788 KB
testcase_15 AC 6 ms
11,740 KB
testcase_16 AC 6 ms
11,764 KB
testcase_17 WA -
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <bits/stdc++.h>
using namespace std;
#define ll long long
static int field[1281][1681];
int main() {
  int n, xlb, xrb;
  cin >> n >> xlb >> xrb;
  for(int x=0; x<1281; x++) {
    for(int y=0; y<1681; y++) {
      field[x][y] = 0;
    }
  }
  for(int id=1; id<=n; id++) {
    int xl, yu, xr, yd;
    cin >> xl >> yu >> xr >> yd;
    for(int x=max(1, xl); x<=min(xr, 1280); x++) {
      for(int y=max(1, yu); y<=min(yd, 1680); y++) {
	field[x][y] = id;
      }
    }
  }
  set<int> s;
  for(int x=1; x<=1280; x++) {
    for(int y=1680; y>=0; y--) {
      if(field[x][y]!=0) {
	s.insert(field[x][y]);
	break;
      }
    }
  }
  for(int id=1; id<=n; id++) {
    if(s.find(id)!=s.end()) {
      cout << "1" << endl;
    } else {
      cout << "0" << endl;
    }
  }
  return 0;
}
0