Submission #530231

# Submission time Handle Problem Language Result Execution time Memory
530231 2022-02-24T20:24:44 Z Jean7 Trampoline (info1cup20_trampoline) C++14
0 / 100
55 ms 7652 KB
#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-- )
    {
        cin >> sx >> sy >> ex >> ey ;
        if ( sx > ex || sy > ey ) { cout << "NO\n" ; continue ; }
        while ( sx <= ex && sy <= ey )
        {
            if ( a[sx][sy] ) sx++ ;
            else sy++ ;
        }
        sx == ex ? cout << "YES\n" : cout << "NO\n" ;
    }
    return 0 ;
}
# Verdict Execution time Memory Grader output
1 Incorrect 2 ms 844 KB expected YES, found NO [1st token]
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 55 ms 7652 KB expected YES, found NO [3rd 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 -