Submission #892942

# Submission time Handle Problem Language Result Execution time Memory
892942 2023-12-26T08:21:38 Z Hhw48 Trampoline (info1cup20_trampoline) C++14
0 / 100
26 ms 10076 KB
#include <bits/stdc++.h>
using namespace std;
#define int long long
typedef pair<int,int> pii;
#define fi first
#define se second
int32_t main(){
	ios::sync_with_stdio(0);
	cin.tie(0);
	int r,c,n;
	cin>>r>>c>>n;
	vector<int>s[n];
	for(int i=0; i<n; i++){
		int y,x;
		cin>>y>>x;
		s[y].push_back(x);
	}
	int t;
	cin>>t;
	while(t--){
		int sy,sx,ey,ex;
		cin>>sy>>sx>>ey>>ex;
		if(s[sy].empty()){
			cout<<"No\n";
			continue;
		}
		bool flag=0;
		for(int i=0; i<s[sy].size(); i++){
			if(s[sy][i]<=ex){
				cout<<"Yes\n";
				flag=1;
				break;
			}
		}
		if(flag==0)cout<<"No\n";
	}
}

Compilation message

trampoline.cpp: In function 'int32_t main()':
trampoline.cpp:28:17: warning: comparison of integer expressions of different signedness: 'long long int' and 'std::vector<long long int>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
   28 |   for(int i=0; i<s[sy].size(); i++){
      |                ~^~~~~~~~~~~~~
# Verdict Execution time Memory Grader output
1 Incorrect 1 ms 604 KB expected NO, found YES [2nd token]
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 26 ms 7872 KB expected NO, found YES [1st token]
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Runtime error 6 ms 10076 KB Execution killed with signal 11
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Runtime error 1 ms 600 KB Execution killed with signal 11
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Runtime error 8 ms 10076 KB Execution killed with signal 11
2 Halted 0 ms 0 KB -