結果
| 問題 |
No.678 2Dシューティングゲームの必殺ビーム
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2024-09-19 22:05:58 |
| 言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
AC
|
| 実行時間 | 3 ms / 2,000 ms |
| コード長 | 619 bytes |
| コンパイル時間 | 2,170 ms |
| コンパイル使用メモリ | 209,940 KB |
| 最終ジャッジ日時 | 2025-02-24 09:34:18 |
|
ジャッジサーバーID (参考情報) |
judge3 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 18 |
ソースコード
#include <bits/stdc++.h>
using namespace std;
using ll = long long;
int main() {
cin.tie(nullptr);
ios::sync_with_stdio(false);
ll N,L,R;
cin>>N>>L>>R;
map<ll,vector<pair<ll,ll>>> D;
for(int i=0;i<N;i++){
ll l,u,r,d;
cin>>l>>u>>r>>d;
for(ll x=max(L,l);x<=min(R,r);x++){
D[x].push_back({d,i});
}
}
vector<bool> OK(N,0);
for(ll x=L;x<=R;x++){
if(!D.count(x))continue;
sort(D[x].begin(),D[x].end());
reverse(D[x].begin(),D[x].end());
OK[D[x][0].second]=1;
}
for(int i=0;i<N;i++)cout<<OK[i]<<endl;
}