Submission #530231

#TimeUsernameProblemLanguageResultExecution timeMemory
530231Jean7Trampoline (info1cup20_trampoline)C++14
0 / 100
55 ms7652 KiB
#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 timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...