Submission #735139

#TimeUTC-0UsernameProblemLanguageResultExecution timeMemory
7351392023-05-03 15:32:29keisuke6New Home (APIO18_new_home)C++14
12 / 100
5059 ms69848 KiB
#include <bits/stdc++.h>
using namespace std;
#define int long long
signed main(){
int N,K,Q;
cin>>N>>K>>Q;
vector<int> X(N),T(N),A(N),B(N);
vector<vector<tuple<int,int,int>>> G(K);
vector<multiset<tuple<int,int,int>>> sta(K);
vector<multiset<int>> Z(K);
vector<int> I(K,0);
for(int i=0;i<N;i++){
cin>>X[i]>>T[i]>>A[i]>>B[i];
T[i]--;
G[T[i]].push_back({A[i],B[i],X[i]});
}
for(int i=0;i<K;i++){
sort(G[i].begin(),G[i].end());
}
vector<pair<int,int>> Que(Q);
for(int i=0;i<Q;i++) cin>>Que[i].second>>Que[i].first;
vector<pair<int,int>> Que_ = Que;
sort(Que.begin(),Que.end());
map<pair<int,int>,int> m_ans;
for(int i=0;i<Q;i++){
int t = Que[i].first, x = Que[i].second;
for(int j=0;j<K;j++){
while(I[j] != G[j].size()){
int aa,bb,cc;
tie(aa,bb,cc) = G[j][I[j]];
 
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

Compilation message (stderr)

new_home.cpp: In function 'int main()':
new_home.cpp:28:18: warning: comparison of integer expressions of different signedness: '__gnu_cxx::__alloc_traits<std::allocator<long long int>, long long int>::value_type' {aka 'long long int'} and 'std::vector<std::tuple<long long int, long long int, long long int> >::size_type' {aka 'long unsigned int'} [-Wsign-compare]
   28 |       while(I[j] != G[j].size()){
#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...
#Verdict Execution timeMemoryGrader output
Fetching results...