제출 #1353656

#제출 시각아이디문제언어결과실행 시간메모리
1353656yyc000123Find the Box (EGOI23_findthebox)C++20
0 / 100
0 ms344 KiB
#include<bits/stdc++.h>
using namespace std ;
const int N = 55 ;
int n , m , x , y ;

int main(){
    cin >> n >> m ;
    cout << "? " ;
    for(int i=0 ; i<m ; i++) cout << '>' ;
    for(int i=0 ; i<n ; i++) cout << 'v' ;
    cout << endl ;
    cin >> x >> y ;
    if(x!=n-1 || y!=m-1){
        if(x!=n-1) x++ ;
        else y++ ;
        cout << "! " << x << ' ' << y << endl ;
        return 0 ;
    }
    cout << "? " ;
    for(int i=0 ; i<n ; i++){
        for(int j=0 ; j<m ; j++) cout << '>' ;
        for(int j=1 ; j<m ; j++) cout << "v<^" ;
        cout << "<v" ;
    }
    cout << endl ;
    cin >> x >> y ;
    cout << "! " << x << ' ' << y-1 << endl ;
    return 0 ;
}
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...