#include <bits/stdc++.h>
#define fastio ios::sync_with_stdio(0),cin.tie(0),cout.tie(0)
#define int long long
using namespace std ;
bool a[3000][3000] ;
signed main ()
{
fastio ;
int r , c , n , x , y , t , sx , sy , ex , ey ;
cin >> r >> c >> n ;
while ( n-- )
{
cin >> x >> y ;
a[x][y] = 1 ;
}
cin >> t ;
while ( t-- )
{
bool jean = 1 ;
cin >> sx >> sy >> ex >> ey ;
if ( sx > ex || sy > ey ) { cout << "NO\n" ; continue ; }
while ( sx <= r && sy <= c )
{
if ( sx == ex ) { cout << "YES\n" ; jean = 0 ; break ; }
if ( a[sx][sy] ) sx++ ;
else sy++ ;
}
if ( jean ) cout << "NO\n" ;
}
return 0 ;
}
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
2 ms |
912 KB |
expected NO, found YES [2nd token] |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
61 ms |
7656 KB |
expected NO, found YES [121st token] |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Runtime error |
1 ms |
460 KB |
Execution killed with signal 11 |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Runtime error |
1 ms |
460 KB |
Execution killed with signal 11 |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Runtime error |
1 ms |
460 KB |
Execution killed with signal 11 |
2 |
Halted |
0 ms |
0 KB |
- |