Submission #234410

# Submission time Handle Problem Language Result Execution time Memory
234410 2020-05-24T07:13:30 Z VEGAnn Plahte (COCI17_plahte) C++14
0 / 160
2000 ms 4600 KB
#include <bits/stdc++.h>
#define sz(x) ((int)x.size())
using namespace std;
typedef long long ll;
const int N = 80100;
const int oo = 2e9;
unordered_set<int> st;
int a[N], b[N], c[N], d[N], n, m, x[N], y[N], k[N];

int main(){
    ios_base::sync_with_stdio(0); cin.tie(0);

#ifdef _LOCAL
    freopen("in.txt","r",stdin);
#endif // _LOCAL

    cin >> n >> m;

    for (int i = 0; i < n; i++)
        cin >> a[i] >> b[i] >> c[i] >> d[i];

    for (int i = 0; i < m; i++)
        cin >> x[i] >> y[i] >> k[i];

    for (int i = 0; i < n; i++){
        int ans = 0;
        st.clear();


        for (int j = 0; j < m; j++)
            if (a[i] <= x[j] && c[i] >= x[j] && b[i] <= y[j] && d[i] >= y[j] &&
                st.find(k[i]) == st.end()){
                    ans++;
                    st.insert(k[i]);
                }

        cout << ans << '\n';
    }

    return 0;
}
# Verdict Execution time Memory Grader output
1 Execution timed out 2060 ms 2020 KB Time limit exceeded
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Execution timed out 2082 ms 2016 KB Time limit exceeded
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Execution timed out 2083 ms 2848 KB Time limit exceeded
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Execution timed out 2082 ms 4472 KB Time limit exceeded
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Execution timed out 2092 ms 4600 KB Time limit exceeded
2 Halted 0 ms 0 KB -