CSES - Datatähti Open 2019 - Results
Submission details
Task:Robot
Sender:faustaadp
Submission time:2019-01-19 06:43:59 +0200
Language:C++
Status:COMPILE ERROR

Compiler report

input/code.cpp: In function 'int main()':
input/code.cpp:28:7: error: no match for 'operator<' (operand types are 'std::ostream {aka std::basic_ostream<char>}' and 'const char [12]')
   cout<"IMPOSSIBLE\n";
   ~~~~^~~~~~~~~~~~~~~
In file included from /usr/include/c++/7/regex:62:0,
                 from /usr/include/x86_64-linux-gnu/c++/7/bits/stdc++.h:110,
                 from input/code.cpp:1:
/usr/include/c++/7/bits/regex.h:1004:5: note: candidate: template<class _BiIter> bool std::__cxx11::operator<(const std::__cxx11::sub_match<_BiIter>&, const std::__cxx11::sub_match<_BiIter>&)
     operator<(const sub_match<_BiIter>& __lhs, const sub_match<_BiIter>& __rhs)
     ^~~~~~~~
/usr/include/c++/7/bits/regex.h:1004:5: note:   template argument deduction/substitution failed:
input/code.cpp:28:8: note:   'std::ostream {aka std::basic_ostream<char>}' is not derived from 'const std::__cxx11::sub_match<_BiIter>'
   cout<"IMPOSSIBLE\n";
        ^~~~~~~~~~~~~~
In file included from /usr/includ...

Code

#include<bits/stdc++.h>
#define ll long long
#define pb push_back
#define mp make_pair
#define fi first
#define se second
using namespace std;
ll n,m,i;
int main()
{
	ios_base::sync_with_stdio(NULL);cin.tie(NULL);cout.tie(NULL);
	cin>>n>>m;
	if(n==2)
	{
		for(i=1;i<m;i++)cout<<'R';
		cout<<"B\nB";
		for(i=1;i<m;i++)cout<<'G';
		cout<<"\n";
	}
	else
	if(m==2)
	{
		for(i=1;i<n;i++)cout<<"RG\n";
		cout<<"RB\n";
	}
	else
	if(n==4&&m==4)
		cout<"IMPOSSIBLE\n";
}