Submission #1353592

#TimeUsernameProblemLanguageResultExecution timeMemory
1353592yyc000123Find the Box (EGOI23_findthebox)C++20
0 / 100
0 ms412 KiB
#include<bits/stdc++.h>
using namespace std ;
const int N = 55 ;
int n , m , x , y ;
string s ;

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