답안 #530229

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
530229 2022-02-24T20:19:51 Z Jean7 Trampoline (info1cup20_trampoline) C++14
0 / 100
51 ms 7664 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 && sx <= r && sy <= c )
        {
            if ( a[sx][sy] ) sx++ ;
            else sy++ ;
        }
        sx == ex ? cout << "YES\n" : cout << "NO\n" ;
    }
    return 0 ;
}
# 결과 실행 시간 메모리 Grader output
1 Correct 2 ms 844 KB 200 token(s): yes count is 21, no count is 179
2 Incorrect 2 ms 784 KB expected YES, found NO [150th token]
3 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Correct 41 ms 7664 KB 4000 token(s): yes count is 99, no count is 3901
2 Correct 51 ms 7648 KB 4000 token(s): yes count is 91, no count is 3909
3 Correct 27 ms 1792 KB 4000 token(s): yes count is 4000, no count is 0
4 Incorrect 42 ms 7664 KB expected YES, found NO [544th token]
5 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Runtime error 1 ms 460 KB Execution killed with signal 11
2 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Runtime error 1 ms 460 KB Execution killed with signal 11
2 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Runtime error 1 ms 460 KB Execution killed with signal 11
2 Halted 0 ms 0 KB -