# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
59865 | dukati8 | New Home (APIO18_new_home) | C++14 | 5086 ms | 59260 KiB |
This submission is migrated from previous version of oj.uz, which used different machine for grading. This submission may have different result if resubmitted.
#include <bits/stdc++.h>
using namespace std;
#define rep(i,a,b) for(int i=a; i<int(b); i++)
int main() {
int n,q,k;
cin >> n >> k >> q;
vector<vector<int> > stores(n);
rep (i,0,n) {
int x,t,a,b;
cin >> x >> t >> a >> b;
stores[i]={x,t,a,b};
}
vector< pair<int,int> > queries(q);
rep (i,0,q) {
int l,y;
cin >> l >> y;
queries[i]=make_pair(l,y);
}
vector <set < vector<int> > > types(k);
rep (i,0,n) {
int t=stores[i][1]-1;
types[t].insert(stores[i]);
}
rep (i,0,q) {
int dist=0;
int l,y;
l=queries[i].first;
y=queries[i].second;
rep (i,0,k) {
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |