Submission #504009

# Submission time Handle Problem Language Result Execution time Memory
504009 2022-01-09T13:02:30 Z bebecanvas Trampoline (info1cup20_trampoline) C++14
0 / 100
413 ms 1048580 KB
#include <bits/stdc++.h>

using namespace std;
#define int long long
#define endl '\n'


signed main(){

    ios_base::sync_with_stdio(false);
    cin.tie(0);
    
    int r, c, n; cin >> r >> c >> n;
	set<int> s[r];

	for(int i=0; i<n; i++){
		int a, b; cin >> a >> b; a--; b--;
		s[a].insert(b);
	}
	
	
	
	int q; cin >> q;
	for(int i=0; i<q; i++){
		int a, b, c, d; cin >> a >> b >> c >> d;
		a--; b--; c--; d--;
		
	
		set<int> ::iterator it;
		it= s[a].lower_bound(b);
		if(it!=s[a].end()){
			int f= *it;
			if(f<=d){cout << "Yes" << endl;}
			else{cout << "No" << endl;}
		}else{cout << "No" << endl;}
	}
	

}

# Verdict Execution time Memory Grader output
1 Incorrect 2 ms 716 KB expected NO, found YES [2nd token]
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 87 ms 9768 KB expected NO, found YES [1st token]
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Runtime error 413 ms 1048580 KB Execution killed with signal 9
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Runtime error 364 ms 1048580 KB Execution killed with signal 9
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Runtime error 384 ms 1048580 KB Execution killed with signal 9
2 Halted 0 ms 0 KB -