Submission #985926

#TimeUsernameProblemLanguageResultExecution timeMemory
985926MighilonPlahte (COCI17_plahte)C++17
0 / 160
2065 ms7508 KiB
#include <bits/stdc++.h> using namespace std; #ifdef DEBUG #include "../Library/debug.h" #else #define dbg(x...) // #define cin fin // #define cout fout // const string FILE_NAME = ""; ifstream fin(FILE_NAME + ".in"); ofstream fout(FILE_NAME + ".out"); #endif typedef long long ll; typedef long double ld; typedef pair<int, int> pi; typedef pair<ll, ll> pl; typedef vector<int> vi; typedef vector<ll> vl; typedef vector<pi> vpi; typedef vector<pl> vpl; #define FOR(i, a, b) for (int i = (a); i < (b); ++i) #define F0R(i, a) for (int i = 0; i < (a); ++i) #define FORd(i, a, b) for (int i = (b) - 1; i >= (a); --i) #define F0Rd(i, a) for (int i = (a) - 1; i >= 0; --i) #define trav(a, x) for (auto& a : x) #define f first #define s second #define pb push_back #define sz(x) (int)(x).size() #define all(x) x.begin(), x.end() const char nl = '\n'; const int INF = 1e9; const int MOD = 1e9 + 7; void solve(){ int n, m; cin >> n >> m; vector<array<int, 4>> r(n); F0R(i, n){ F0R(j, 4) cin >> r[i][j]; } vector<array<int, 3>> c(m); F0R(i, m){ cin >> c[i][0] >> c[i][1] >> c[i][2]; } F0R(i, n){ set<int> ans; F0R(j, m){ if(c[j][0] >= r[i][0] && c[j][1] >= r[i][1] && c[j][0] <= r[i][2] && c[j][1] <= r[i][3]) ans.insert(c[i][2]); } cout << ans.size() << nl; } } int32_t main(){ ios::sync_with_stdio(false); cin.tie(NULL); cout.tie(NULL); int TC = 1; // cin >> TC; while(TC--){ solve(); } return 0; }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...