제출 #1352546

#제출 시각아이디문제언어결과실행 시간메모리
1352546branches1029Find the Box (EGOI23_findthebox)C++20
20 / 100
1 ms436 KiB
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;


int main(){

    ios::sync_with_stdio(0); cin.tie(0); cout.tie(0);

    int n, m;
    cin >> n >> m;
    for( int i=0 ; i<n ; i++ ){
        string s="";
        for( int j=0 ; j<i ; j++ ) s+='v';
        for( int j=0 ; j<m ; j++ ) s+='>';
        cout << '?' << ' ' << s << endl;
        int x, y;
        cin >> x >> y;
        if( x==i-1 ){
            cout << '!' << ' ' << i << ' ' << 0 << '\n';
            return 0;
        }
        else if( y!=m-1 ){
            cout << '!' << ' ' << i << ' ' << y+1 << '\n';
            return 0;
        }
    }
    cout << '!' << ' ' << n-1 << ' ' << m-1 << '\n';

    return 0;
}
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...