output
stringlengths 52
181k
| instruction
stringlengths 296
182k
|
---|---|
#include <iostream>
using namespace std;
int main() {
string S,T;
cin>>S>>T;
cout<<T+S;
return 0;
}
| ### Prompt
Please provide a cpp coded solution to the problem described below:
Given are two strings S and T consisting of lowercase English letters. Concatenate T and S in this order, without space in between, and print the resulting string.
Constraints
* S and T are strings consisting of lowercase English letters.
* The lengths of S and T are between 1 and 100 (inclusive).
Input
Input is given from Standard Input in the following format:
S T
Output
Print the resulting string.
Examples
Input
oder atc
Output
atcoder
Input
humu humu
Output
humuhumu
### Response
```cpp
#include <iostream>
using namespace std;
int main() {
string S,T;
cin>>S>>T;
cout<<T+S;
return 0;
}
``` |
#include <bits/stdc++.h>
using namespace std;
int main()
{
string a,b;
cin>>a>>b;
b=b+a;
cout<<b;
}
| ### Prompt
Create a solution in CPP for the following problem:
Given are two strings S and T consisting of lowercase English letters. Concatenate T and S in this order, without space in between, and print the resulting string.
Constraints
* S and T are strings consisting of lowercase English letters.
* The lengths of S and T are between 1 and 100 (inclusive).
Input
Input is given from Standard Input in the following format:
S T
Output
Print the resulting string.
Examples
Input
oder atc
Output
atcoder
Input
humu humu
Output
humuhumu
### Response
```cpp
#include <bits/stdc++.h>
using namespace std;
int main()
{
string a,b;
cin>>a>>b;
b=b+a;
cout<<b;
}
``` |
#include<bits/stdc++.h>
using namespace std;
int main()
{
string t,s;
cin>>s>>t;
cout<<t+s<<endl;
}
| ### Prompt
Your challenge is to write a CPP solution to the following problem:
Given are two strings S and T consisting of lowercase English letters. Concatenate T and S in this order, without space in between, and print the resulting string.
Constraints
* S and T are strings consisting of lowercase English letters.
* The lengths of S and T are between 1 and 100 (inclusive).
Input
Input is given from Standard Input in the following format:
S T
Output
Print the resulting string.
Examples
Input
oder atc
Output
atcoder
Input
humu humu
Output
humuhumu
### Response
```cpp
#include<bits/stdc++.h>
using namespace std;
int main()
{
string t,s;
cin>>s>>t;
cout<<t+s<<endl;
}
``` |
#include <bits/stdc++.h>
using namespace std;
int main() {
string K,X;
cin >> K >>X;
cout << X+K <<endl;
} | ### Prompt
Your task is to create a Cpp solution to the following problem:
Given are two strings S and T consisting of lowercase English letters. Concatenate T and S in this order, without space in between, and print the resulting string.
Constraints
* S and T are strings consisting of lowercase English letters.
* The lengths of S and T are between 1 and 100 (inclusive).
Input
Input is given from Standard Input in the following format:
S T
Output
Print the resulting string.
Examples
Input
oder atc
Output
atcoder
Input
humu humu
Output
humuhumu
### Response
```cpp
#include <bits/stdc++.h>
using namespace std;
int main() {
string K,X;
cin >> K >>X;
cout << X+K <<endl;
}
``` |
#include <stdio.h>
int main(){
char S[101], T[101];
scanf("%s%s", S, T);
printf("%s%s\n", T, S);
} | ### Prompt
In Cpp, your task is to solve the following problem:
Given are two strings S and T consisting of lowercase English letters. Concatenate T and S in this order, without space in between, and print the resulting string.
Constraints
* S and T are strings consisting of lowercase English letters.
* The lengths of S and T are between 1 and 100 (inclusive).
Input
Input is given from Standard Input in the following format:
S T
Output
Print the resulting string.
Examples
Input
oder atc
Output
atcoder
Input
humu humu
Output
humuhumu
### Response
```cpp
#include <stdio.h>
int main(){
char S[101], T[101];
scanf("%s%s", S, T);
printf("%s%s\n", T, S);
}
``` |
#include<bits/stdc++.h>
using namespace std;
int main()
{
string s,s1;
cin>>s>>s1;
cout<<s1<<s;
return 0;
}
| ### Prompt
Develop a solution in cpp to the problem described below:
Given are two strings S and T consisting of lowercase English letters. Concatenate T and S in this order, without space in between, and print the resulting string.
Constraints
* S and T are strings consisting of lowercase English letters.
* The lengths of S and T are between 1 and 100 (inclusive).
Input
Input is given from Standard Input in the following format:
S T
Output
Print the resulting string.
Examples
Input
oder atc
Output
atcoder
Input
humu humu
Output
humuhumu
### Response
```cpp
#include<bits/stdc++.h>
using namespace std;
int main()
{
string s,s1;
cin>>s>>s1;
cout<<s1<<s;
return 0;
}
``` |
#include<iostream>
using namespace std;
int main(){
string S,T;
cin >> S >> T;
cout << T << S;
} | ### Prompt
Construct a Cpp code solution to the problem outlined:
Given are two strings S and T consisting of lowercase English letters. Concatenate T and S in this order, without space in between, and print the resulting string.
Constraints
* S and T are strings consisting of lowercase English letters.
* The lengths of S and T are between 1 and 100 (inclusive).
Input
Input is given from Standard Input in the following format:
S T
Output
Print the resulting string.
Examples
Input
oder atc
Output
atcoder
Input
humu humu
Output
humuhumu
### Response
```cpp
#include<iostream>
using namespace std;
int main(){
string S,T;
cin >> S >> T;
cout << T << S;
}
``` |
#include<iostream>
using namespace std;
int main(){
char S[100],T[100];
cin >> S >> T;
cout << T << S;
} | ### Prompt
In Cpp, your task is to solve the following problem:
Given are two strings S and T consisting of lowercase English letters. Concatenate T and S in this order, without space in between, and print the resulting string.
Constraints
* S and T are strings consisting of lowercase English letters.
* The lengths of S and T are between 1 and 100 (inclusive).
Input
Input is given from Standard Input in the following format:
S T
Output
Print the resulting string.
Examples
Input
oder atc
Output
atcoder
Input
humu humu
Output
humuhumu
### Response
```cpp
#include<iostream>
using namespace std;
int main(){
char S[100],T[100];
cin >> S >> T;
cout << T << S;
}
``` |
#include<iostream>
#include<string>
using namespace std;
int main(){
string S,T;
cin>>S>>T;
T=T+S;
cout<<T<<endl;
} | ### Prompt
Construct a Cpp code solution to the problem outlined:
Given are two strings S and T consisting of lowercase English letters. Concatenate T and S in this order, without space in between, and print the resulting string.
Constraints
* S and T are strings consisting of lowercase English letters.
* The lengths of S and T are between 1 and 100 (inclusive).
Input
Input is given from Standard Input in the following format:
S T
Output
Print the resulting string.
Examples
Input
oder atc
Output
atcoder
Input
humu humu
Output
humuhumu
### Response
```cpp
#include<iostream>
#include<string>
using namespace std;
int main(){
string S,T;
cin>>S>>T;
T=T+S;
cout<<T<<endl;
}
``` |
#include <stdio.h>
int main() {
char s1[101],s2[101];
scanf("%s %s",&s1,&s2);
printf("%s%s\n",s2,s1);
return 0;
} | ### Prompt
Create a solution in Cpp for the following problem:
Given are two strings S and T consisting of lowercase English letters. Concatenate T and S in this order, without space in between, and print the resulting string.
Constraints
* S and T are strings consisting of lowercase English letters.
* The lengths of S and T are between 1 and 100 (inclusive).
Input
Input is given from Standard Input in the following format:
S T
Output
Print the resulting string.
Examples
Input
oder atc
Output
atcoder
Input
humu humu
Output
humuhumu
### Response
```cpp
#include <stdio.h>
int main() {
char s1[101],s2[101];
scanf("%s %s",&s1,&s2);
printf("%s%s\n",s2,s1);
return 0;
}
``` |
#include <iostream>
using namespace std;
string a,b;
int main()
{
cin>>a>>b;
cout<<b+a;
return 0;
}
| ### Prompt
Create a solution in cpp for the following problem:
Given are two strings S and T consisting of lowercase English letters. Concatenate T and S in this order, without space in between, and print the resulting string.
Constraints
* S and T are strings consisting of lowercase English letters.
* The lengths of S and T are between 1 and 100 (inclusive).
Input
Input is given from Standard Input in the following format:
S T
Output
Print the resulting string.
Examples
Input
oder atc
Output
atcoder
Input
humu humu
Output
humuhumu
### Response
```cpp
#include <iostream>
using namespace std;
string a,b;
int main()
{
cin>>a>>b;
cout<<b+a;
return 0;
}
``` |
#include <bits/stdc++.h>
using namespace std;
int main()
{
string S,T;
cin >>S>>T;
{
cout <<T<<S<<endl;
}
} | ### Prompt
Develop a solution in cpp to the problem described below:
Given are two strings S and T consisting of lowercase English letters. Concatenate T and S in this order, without space in between, and print the resulting string.
Constraints
* S and T are strings consisting of lowercase English letters.
* The lengths of S and T are between 1 and 100 (inclusive).
Input
Input is given from Standard Input in the following format:
S T
Output
Print the resulting string.
Examples
Input
oder atc
Output
atcoder
Input
humu humu
Output
humuhumu
### Response
```cpp
#include <bits/stdc++.h>
using namespace std;
int main()
{
string S,T;
cin >>S>>T;
{
cout <<T<<S<<endl;
}
}
``` |
#include <bits/stdc++.h>
using namespace std;
string S, T;
int main() {
cin >> S >> T;
cout << T + S << endl;
} | ### Prompt
Construct a Cpp code solution to the problem outlined:
Given are two strings S and T consisting of lowercase English letters. Concatenate T and S in this order, without space in between, and print the resulting string.
Constraints
* S and T are strings consisting of lowercase English letters.
* The lengths of S and T are between 1 and 100 (inclusive).
Input
Input is given from Standard Input in the following format:
S T
Output
Print the resulting string.
Examples
Input
oder atc
Output
atcoder
Input
humu humu
Output
humuhumu
### Response
```cpp
#include <bits/stdc++.h>
using namespace std;
string S, T;
int main() {
cin >> S >> T;
cout << T + S << endl;
}
``` |
#include<iostream>
using namespace std;
int main(){
string s,t;
cin>>s>>t;
cout<<(t+s);
} | ### Prompt
In cpp, your task is to solve the following problem:
Given are two strings S and T consisting of lowercase English letters. Concatenate T and S in this order, without space in between, and print the resulting string.
Constraints
* S and T are strings consisting of lowercase English letters.
* The lengths of S and T are between 1 and 100 (inclusive).
Input
Input is given from Standard Input in the following format:
S T
Output
Print the resulting string.
Examples
Input
oder atc
Output
atcoder
Input
humu humu
Output
humuhumu
### Response
```cpp
#include<iostream>
using namespace std;
int main(){
string s,t;
cin>>s>>t;
cout<<(t+s);
}
``` |
#include<bits/stdc++.h>
using namespace std;
int main(){
string s,t,r;
cin>>s>>t;
r=t+s;
cout<<r;
} | ### Prompt
Your challenge is to write a Cpp solution to the following problem:
Given are two strings S and T consisting of lowercase English letters. Concatenate T and S in this order, without space in between, and print the resulting string.
Constraints
* S and T are strings consisting of lowercase English letters.
* The lengths of S and T are between 1 and 100 (inclusive).
Input
Input is given from Standard Input in the following format:
S T
Output
Print the resulting string.
Examples
Input
oder atc
Output
atcoder
Input
humu humu
Output
humuhumu
### Response
```cpp
#include<bits/stdc++.h>
using namespace std;
int main(){
string s,t,r;
cin>>s>>t;
r=t+s;
cout<<r;
}
``` |
#include<bits/stdc++.h>
using namespace std;
int main(){
string a,s;
cin >> a>>s;
cout << s+a<<endl;
}
| ### Prompt
Generate a CPP solution to the following problem:
Given are two strings S and T consisting of lowercase English letters. Concatenate T and S in this order, without space in between, and print the resulting string.
Constraints
* S and T are strings consisting of lowercase English letters.
* The lengths of S and T are between 1 and 100 (inclusive).
Input
Input is given from Standard Input in the following format:
S T
Output
Print the resulting string.
Examples
Input
oder atc
Output
atcoder
Input
humu humu
Output
humuhumu
### Response
```cpp
#include<bits/stdc++.h>
using namespace std;
int main(){
string a,s;
cin >> a>>s;
cout << s+a<<endl;
}
``` |
#include <iostream>
using namespace std;
int main() {
string s, t; cin >> s >> t;
cout << t << s << endl;
} | ### Prompt
Please provide a CPP coded solution to the problem described below:
Given are two strings S and T consisting of lowercase English letters. Concatenate T and S in this order, without space in between, and print the resulting string.
Constraints
* S and T are strings consisting of lowercase English letters.
* The lengths of S and T are between 1 and 100 (inclusive).
Input
Input is given from Standard Input in the following format:
S T
Output
Print the resulting string.
Examples
Input
oder atc
Output
atcoder
Input
humu humu
Output
humuhumu
### Response
```cpp
#include <iostream>
using namespace std;
int main() {
string s, t; cin >> s >> t;
cout << t << s << endl;
}
``` |
#include "bits/stdc++.h"
using namespace std;
int main(){
string S,T;
cin >> S >> T;
cout << T + S;
}
| ### Prompt
Develop a solution in CPP to the problem described below:
Given are two strings S and T consisting of lowercase English letters. Concatenate T and S in this order, without space in between, and print the resulting string.
Constraints
* S and T are strings consisting of lowercase English letters.
* The lengths of S and T are between 1 and 100 (inclusive).
Input
Input is given from Standard Input in the following format:
S T
Output
Print the resulting string.
Examples
Input
oder atc
Output
atcoder
Input
humu humu
Output
humuhumu
### Response
```cpp
#include "bits/stdc++.h"
using namespace std;
int main(){
string S,T;
cin >> S >> T;
cout << T + S;
}
``` |
#include <iostream>
using namespace std;
string s,t;
int main()
{
cin>>s>>t;
cout<<t+s;
}
| ### Prompt
Generate a cpp solution to the following problem:
Given are two strings S and T consisting of lowercase English letters. Concatenate T and S in this order, without space in between, and print the resulting string.
Constraints
* S and T are strings consisting of lowercase English letters.
* The lengths of S and T are between 1 and 100 (inclusive).
Input
Input is given from Standard Input in the following format:
S T
Output
Print the resulting string.
Examples
Input
oder atc
Output
atcoder
Input
humu humu
Output
humuhumu
### Response
```cpp
#include <iostream>
using namespace std;
string s,t;
int main()
{
cin>>s>>t;
cout<<t+s;
}
``` |
#include <bits/stdc++.h>
using namespace std;
int main()
{
string S, T;
cin >> S >> T;
cout << T << S << '\n';
}
| ### Prompt
Create a solution in Cpp for the following problem:
Given are two strings S and T consisting of lowercase English letters. Concatenate T and S in this order, without space in between, and print the resulting string.
Constraints
* S and T are strings consisting of lowercase English letters.
* The lengths of S and T are between 1 and 100 (inclusive).
Input
Input is given from Standard Input in the following format:
S T
Output
Print the resulting string.
Examples
Input
oder atc
Output
atcoder
Input
humu humu
Output
humuhumu
### Response
```cpp
#include <bits/stdc++.h>
using namespace std;
int main()
{
string S, T;
cin >> S >> T;
cout << T << S << '\n';
}
``` |
#include <iostream>
using namespace std;
int main(){
string a,b;
cin>>a>>b;
cout<<b<<a;
return 0;
}
| ### Prompt
Create a solution in Cpp for the following problem:
Given are two strings S and T consisting of lowercase English letters. Concatenate T and S in this order, without space in between, and print the resulting string.
Constraints
* S and T are strings consisting of lowercase English letters.
* The lengths of S and T are between 1 and 100 (inclusive).
Input
Input is given from Standard Input in the following format:
S T
Output
Print the resulting string.
Examples
Input
oder atc
Output
atcoder
Input
humu humu
Output
humuhumu
### Response
```cpp
#include <iostream>
using namespace std;
int main(){
string a,b;
cin>>a>>b;
cout<<b<<a;
return 0;
}
``` |
#include <stdio.h>
int main()
{
char S[100], T[100];
scanf("%s %s", &S, &T);
printf("%s%s", T, S);
return 0;
} | ### Prompt
Develop a solution in CPP to the problem described below:
Given are two strings S and T consisting of lowercase English letters. Concatenate T and S in this order, without space in between, and print the resulting string.
Constraints
* S and T are strings consisting of lowercase English letters.
* The lengths of S and T are between 1 and 100 (inclusive).
Input
Input is given from Standard Input in the following format:
S T
Output
Print the resulting string.
Examples
Input
oder atc
Output
atcoder
Input
humu humu
Output
humuhumu
### Response
```cpp
#include <stdio.h>
int main()
{
char S[100], T[100];
scanf("%s %s", &S, &T);
printf("%s%s", T, S);
return 0;
}
``` |
#include<bits/stdc++.h>
using namespace std;
int main()
{
string h,j;
cin>>h>>j;
cout<<j<<h;
} | ### Prompt
Develop a solution in cpp to the problem described below:
Given are two strings S and T consisting of lowercase English letters. Concatenate T and S in this order, without space in between, and print the resulting string.
Constraints
* S and T are strings consisting of lowercase English letters.
* The lengths of S and T are between 1 and 100 (inclusive).
Input
Input is given from Standard Input in the following format:
S T
Output
Print the resulting string.
Examples
Input
oder atc
Output
atcoder
Input
humu humu
Output
humuhumu
### Response
```cpp
#include<bits/stdc++.h>
using namespace std;
int main()
{
string h,j;
cin>>h>>j;
cout<<j<<h;
}
``` |
#include<bits/stdc++.h>
using namespace std;
int main()
{
string t,s;
cin>>s>>t;
t.append(s);
cout<<t;
}
| ### Prompt
Please create a solution in CPP to the following problem:
Given are two strings S and T consisting of lowercase English letters. Concatenate T and S in this order, without space in between, and print the resulting string.
Constraints
* S and T are strings consisting of lowercase English letters.
* The lengths of S and T are between 1 and 100 (inclusive).
Input
Input is given from Standard Input in the following format:
S T
Output
Print the resulting string.
Examples
Input
oder atc
Output
atcoder
Input
humu humu
Output
humuhumu
### Response
```cpp
#include<bits/stdc++.h>
using namespace std;
int main()
{
string t,s;
cin>>s>>t;
t.append(s);
cout<<t;
}
``` |
#include<bits/stdc++.h>
char a[105],b[105];
int main()
{
scanf("%s%s",a,b);
printf("%s%s",b,a);
} | ### Prompt
Please provide a cpp coded solution to the problem described below:
Given are two strings S and T consisting of lowercase English letters. Concatenate T and S in this order, without space in between, and print the resulting string.
Constraints
* S and T are strings consisting of lowercase English letters.
* The lengths of S and T are between 1 and 100 (inclusive).
Input
Input is given from Standard Input in the following format:
S T
Output
Print the resulting string.
Examples
Input
oder atc
Output
atcoder
Input
humu humu
Output
humuhumu
### Response
```cpp
#include<bits/stdc++.h>
char a[105],b[105];
int main()
{
scanf("%s%s",a,b);
printf("%s%s",b,a);
}
``` |
#include <iostream>
using namespace std;
int main(){
string s, t;
cin >> s >> t;
cout << (t + s) << '\n';
} | ### Prompt
Your challenge is to write a Cpp solution to the following problem:
Given are two strings S and T consisting of lowercase English letters. Concatenate T and S in this order, without space in between, and print the resulting string.
Constraints
* S and T are strings consisting of lowercase English letters.
* The lengths of S and T are between 1 and 100 (inclusive).
Input
Input is given from Standard Input in the following format:
S T
Output
Print the resulting string.
Examples
Input
oder atc
Output
atcoder
Input
humu humu
Output
humuhumu
### Response
```cpp
#include <iostream>
using namespace std;
int main(){
string s, t;
cin >> s >> t;
cout << (t + s) << '\n';
}
``` |
#include <bits/stdc++.h>
using namespace std;
int main(){
string s,t; cin>>s>>t;
cout << t<<s <<"\n";
} | ### Prompt
Create a solution in cpp for the following problem:
Given are two strings S and T consisting of lowercase English letters. Concatenate T and S in this order, without space in between, and print the resulting string.
Constraints
* S and T are strings consisting of lowercase English letters.
* The lengths of S and T are between 1 and 100 (inclusive).
Input
Input is given from Standard Input in the following format:
S T
Output
Print the resulting string.
Examples
Input
oder atc
Output
atcoder
Input
humu humu
Output
humuhumu
### Response
```cpp
#include <bits/stdc++.h>
using namespace std;
int main(){
string s,t; cin>>s>>t;
cout << t<<s <<"\n";
}
``` |
#include <iostream>
using namespace std;
int main() {
string a, b; cin >> a >> b; cout << b << a << '\n';
} | ### Prompt
Please provide a cpp coded solution to the problem described below:
Given are two strings S and T consisting of lowercase English letters. Concatenate T and S in this order, without space in between, and print the resulting string.
Constraints
* S and T are strings consisting of lowercase English letters.
* The lengths of S and T are between 1 and 100 (inclusive).
Input
Input is given from Standard Input in the following format:
S T
Output
Print the resulting string.
Examples
Input
oder atc
Output
atcoder
Input
humu humu
Output
humuhumu
### Response
```cpp
#include <iostream>
using namespace std;
int main() {
string a, b; cin >> a >> b; cout << b << a << '\n';
}
``` |
#include<bits/stdc++.h>
using namespace std;
int main(){
string s,t;
cin>>t>>s;
cout<<s<<t;
} | ### Prompt
Please create a solution in CPP to the following problem:
Given are two strings S and T consisting of lowercase English letters. Concatenate T and S in this order, without space in between, and print the resulting string.
Constraints
* S and T are strings consisting of lowercase English letters.
* The lengths of S and T are between 1 and 100 (inclusive).
Input
Input is given from Standard Input in the following format:
S T
Output
Print the resulting string.
Examples
Input
oder atc
Output
atcoder
Input
humu humu
Output
humuhumu
### Response
```cpp
#include<bits/stdc++.h>
using namespace std;
int main(){
string s,t;
cin>>t>>s;
cout<<s<<t;
}
``` |
#include<iostream>
using namespace std;
string s,t;
int main() {
cin>>s>>t;
cout<<t+s<<endl;
}
| ### Prompt
Develop a solution in Cpp to the problem described below:
Given are two strings S and T consisting of lowercase English letters. Concatenate T and S in this order, without space in between, and print the resulting string.
Constraints
* S and T are strings consisting of lowercase English letters.
* The lengths of S and T are between 1 and 100 (inclusive).
Input
Input is given from Standard Input in the following format:
S T
Output
Print the resulting string.
Examples
Input
oder atc
Output
atcoder
Input
humu humu
Output
humuhumu
### Response
```cpp
#include<iostream>
using namespace std;
string s,t;
int main() {
cin>>s>>t;
cout<<t+s<<endl;
}
``` |
#include <iostream>
using namespace std;
int main() {
std::string S, T;
cin >> S >> T;
cout << T << S;
} | ### Prompt
Develop a solution in CPP to the problem described below:
Given are two strings S and T consisting of lowercase English letters. Concatenate T and S in this order, without space in between, and print the resulting string.
Constraints
* S and T are strings consisting of lowercase English letters.
* The lengths of S and T are between 1 and 100 (inclusive).
Input
Input is given from Standard Input in the following format:
S T
Output
Print the resulting string.
Examples
Input
oder atc
Output
atcoder
Input
humu humu
Output
humuhumu
### Response
```cpp
#include <iostream>
using namespace std;
int main() {
std::string S, T;
cin >> S >> T;
cout << T << S;
}
``` |
#include<stdio.h>
char s[110];
char t[110];
int main(){
scanf("%s%s",s,t);
printf("%s%s\n",t,s);
}
| ### Prompt
Generate a cpp solution to the following problem:
Given are two strings S and T consisting of lowercase English letters. Concatenate T and S in this order, without space in between, and print the resulting string.
Constraints
* S and T are strings consisting of lowercase English letters.
* The lengths of S and T are between 1 and 100 (inclusive).
Input
Input is given from Standard Input in the following format:
S T
Output
Print the resulting string.
Examples
Input
oder atc
Output
atcoder
Input
humu humu
Output
humuhumu
### Response
```cpp
#include<stdio.h>
char s[110];
char t[110];
int main(){
scanf("%s%s",s,t);
printf("%s%s\n",t,s);
}
``` |
#include <iostream>
using namespace std;
int main()
{
char s[101],t[101];
cin>>s>>t;
cout<<t<<s<<endl;
}
| ### Prompt
Develop a solution in CPP to the problem described below:
Given are two strings S and T consisting of lowercase English letters. Concatenate T and S in this order, without space in between, and print the resulting string.
Constraints
* S and T are strings consisting of lowercase English letters.
* The lengths of S and T are between 1 and 100 (inclusive).
Input
Input is given from Standard Input in the following format:
S T
Output
Print the resulting string.
Examples
Input
oder atc
Output
atcoder
Input
humu humu
Output
humuhumu
### Response
```cpp
#include <iostream>
using namespace std;
int main()
{
char s[101],t[101];
cin>>s>>t;
cout<<t<<s<<endl;
}
``` |
#include <bits/stdc++.h>
int main() { std::string s, t; std::cin >> s >> t; std::cout << t << s << std::endl; } | ### Prompt
Develop a solution in cpp to the problem described below:
Given are two strings S and T consisting of lowercase English letters. Concatenate T and S in this order, without space in between, and print the resulting string.
Constraints
* S and T are strings consisting of lowercase English letters.
* The lengths of S and T are between 1 and 100 (inclusive).
Input
Input is given from Standard Input in the following format:
S T
Output
Print the resulting string.
Examples
Input
oder atc
Output
atcoder
Input
humu humu
Output
humuhumu
### Response
```cpp
#include <bits/stdc++.h>
int main() { std::string s, t; std::cin >> s >> t; std::cout << t << s << std::endl; }
``` |
#include<iostream>
using namespace std;
int main(){
string s,t;
cin>>s>>t;
cout<<(t+s);
return 0;
} | ### Prompt
Develop a solution in CPP to the problem described below:
Given are two strings S and T consisting of lowercase English letters. Concatenate T and S in this order, without space in between, and print the resulting string.
Constraints
* S and T are strings consisting of lowercase English letters.
* The lengths of S and T are between 1 and 100 (inclusive).
Input
Input is given from Standard Input in the following format:
S T
Output
Print the resulting string.
Examples
Input
oder atc
Output
atcoder
Input
humu humu
Output
humuhumu
### Response
```cpp
#include<iostream>
using namespace std;
int main(){
string s,t;
cin>>s>>t;
cout<<(t+s);
return 0;
}
``` |
#include <iostream>
using namespace std;
int main(){
string a,b;
cin>>a>>b;
cout<<b<<a;
}
| ### Prompt
Create a solution in Cpp for the following problem:
Given are two strings S and T consisting of lowercase English letters. Concatenate T and S in this order, without space in between, and print the resulting string.
Constraints
* S and T are strings consisting of lowercase English letters.
* The lengths of S and T are between 1 and 100 (inclusive).
Input
Input is given from Standard Input in the following format:
S T
Output
Print the resulting string.
Examples
Input
oder atc
Output
atcoder
Input
humu humu
Output
humuhumu
### Response
```cpp
#include <iostream>
using namespace std;
int main(){
string a,b;
cin>>a>>b;
cout<<b<<a;
}
``` |
#include <iostream>
int main(void) {
char s[100];
char t[100];
scanf("%s %s", &s, &t);
printf("%s%s", t, s);
} | ### Prompt
Please formulate a CPP solution to the following problem:
Given are two strings S and T consisting of lowercase English letters. Concatenate T and S in this order, without space in between, and print the resulting string.
Constraints
* S and T are strings consisting of lowercase English letters.
* The lengths of S and T are between 1 and 100 (inclusive).
Input
Input is given from Standard Input in the following format:
S T
Output
Print the resulting string.
Examples
Input
oder atc
Output
atcoder
Input
humu humu
Output
humuhumu
### Response
```cpp
#include <iostream>
int main(void) {
char s[100];
char t[100];
scanf("%s %s", &s, &t);
printf("%s%s", t, s);
}
``` |
#include<bits/stdc++.h>
using namespace std;
int main()
{
string s,t;
cin>>s>>t;
cout<<t<<""<<s;
return 0;
}
| ### Prompt
Construct a Cpp code solution to the problem outlined:
Given are two strings S and T consisting of lowercase English letters. Concatenate T and S in this order, without space in between, and print the resulting string.
Constraints
* S and T are strings consisting of lowercase English letters.
* The lengths of S and T are between 1 and 100 (inclusive).
Input
Input is given from Standard Input in the following format:
S T
Output
Print the resulting string.
Examples
Input
oder atc
Output
atcoder
Input
humu humu
Output
humuhumu
### Response
```cpp
#include<bits/stdc++.h>
using namespace std;
int main()
{
string s,t;
cin>>s>>t;
cout<<t<<""<<s;
return 0;
}
``` |
#include<bits/stdc++.h>
using namespace std;
string a,b;
int main()
{
cin>>a>>b;
cout<<b<<a;
} | ### Prompt
Your task is to create a cpp solution to the following problem:
Given are two strings S and T consisting of lowercase English letters. Concatenate T and S in this order, without space in between, and print the resulting string.
Constraints
* S and T are strings consisting of lowercase English letters.
* The lengths of S and T are between 1 and 100 (inclusive).
Input
Input is given from Standard Input in the following format:
S T
Output
Print the resulting string.
Examples
Input
oder atc
Output
atcoder
Input
humu humu
Output
humuhumu
### Response
```cpp
#include<bits/stdc++.h>
using namespace std;
string a,b;
int main()
{
cin>>a>>b;
cout<<b<<a;
}
``` |
#include<iostream>
using namespace std;
int main()
{
string a,b;
cin>>a>>b;
cout<<b<<a;
} | ### Prompt
In CPP, your task is to solve the following problem:
Given are two strings S and T consisting of lowercase English letters. Concatenate T and S in this order, without space in between, and print the resulting string.
Constraints
* S and T are strings consisting of lowercase English letters.
* The lengths of S and T are between 1 and 100 (inclusive).
Input
Input is given from Standard Input in the following format:
S T
Output
Print the resulting string.
Examples
Input
oder atc
Output
atcoder
Input
humu humu
Output
humuhumu
### Response
```cpp
#include<iostream>
using namespace std;
int main()
{
string a,b;
cin>>a>>b;
cout<<b<<a;
}
``` |
#include <stdio.h>
char s[101], t[101];
int main() {
scanf(" %s %s", s, t);
printf("%s%s\n", t, s);
} | ### Prompt
Construct a cpp code solution to the problem outlined:
Given are two strings S and T consisting of lowercase English letters. Concatenate T and S in this order, without space in between, and print the resulting string.
Constraints
* S and T are strings consisting of lowercase English letters.
* The lengths of S and T are between 1 and 100 (inclusive).
Input
Input is given from Standard Input in the following format:
S T
Output
Print the resulting string.
Examples
Input
oder atc
Output
atcoder
Input
humu humu
Output
humuhumu
### Response
```cpp
#include <stdio.h>
char s[101], t[101];
int main() {
scanf(" %s %s", s, t);
printf("%s%s\n", t, s);
}
``` |
#include <iostream>
using namespace std;
int main(void){
string S,T;
cin>>S>>T;
cout<<T+S<<endl;
}
| ### Prompt
Generate a Cpp solution to the following problem:
Given are two strings S and T consisting of lowercase English letters. Concatenate T and S in this order, without space in between, and print the resulting string.
Constraints
* S and T are strings consisting of lowercase English letters.
* The lengths of S and T are between 1 and 100 (inclusive).
Input
Input is given from Standard Input in the following format:
S T
Output
Print the resulting string.
Examples
Input
oder atc
Output
atcoder
Input
humu humu
Output
humuhumu
### Response
```cpp
#include <iostream>
using namespace std;
int main(void){
string S,T;
cin>>S>>T;
cout<<T+S<<endl;
}
``` |
#include <stdio.h>
//sneha
char S[110];
char T[110];
int main()
{
scanf("%s%s",S,T);
printf("%s%s\n",T,S);
} | ### Prompt
Please formulate a cpp solution to the following problem:
Given are two strings S and T consisting of lowercase English letters. Concatenate T and S in this order, without space in between, and print the resulting string.
Constraints
* S and T are strings consisting of lowercase English letters.
* The lengths of S and T are between 1 and 100 (inclusive).
Input
Input is given from Standard Input in the following format:
S T
Output
Print the resulting string.
Examples
Input
oder atc
Output
atcoder
Input
humu humu
Output
humuhumu
### Response
```cpp
#include <stdio.h>
//sneha
char S[110];
char T[110];
int main()
{
scanf("%s%s",S,T);
printf("%s%s\n",T,S);
}
``` |
#include<ios>
int main(){int a[100],b[100];scanf("%s %s",a,b),printf("%s%s",b,a);} | ### Prompt
Please formulate a CPP solution to the following problem:
Given are two strings S and T consisting of lowercase English letters. Concatenate T and S in this order, without space in between, and print the resulting string.
Constraints
* S and T are strings consisting of lowercase English letters.
* The lengths of S and T are between 1 and 100 (inclusive).
Input
Input is given from Standard Input in the following format:
S T
Output
Print the resulting string.
Examples
Input
oder atc
Output
atcoder
Input
humu humu
Output
humuhumu
### Response
```cpp
#include<ios>
int main(){int a[100],b[100];scanf("%s %s",a,b),printf("%s%s",b,a);}
``` |
#include <bits/stdc++.h>
using namespace std;
string s, t;
int main () {
cin >> s >> t;
cout << t << s;
} | ### Prompt
Construct a CPP code solution to the problem outlined:
Given are two strings S and T consisting of lowercase English letters. Concatenate T and S in this order, without space in between, and print the resulting string.
Constraints
* S and T are strings consisting of lowercase English letters.
* The lengths of S and T are between 1 and 100 (inclusive).
Input
Input is given from Standard Input in the following format:
S T
Output
Print the resulting string.
Examples
Input
oder atc
Output
atcoder
Input
humu humu
Output
humuhumu
### Response
```cpp
#include <bits/stdc++.h>
using namespace std;
string s, t;
int main () {
cin >> s >> t;
cout << t << s;
}
``` |
#include "bits/stdc++.h"
using namespace std;
string a,b;
int main()
{
cin>>a>>b;
cout<<b+a;
} | ### Prompt
Your challenge is to write a cpp solution to the following problem:
Given are two strings S and T consisting of lowercase English letters. Concatenate T and S in this order, without space in between, and print the resulting string.
Constraints
* S and T are strings consisting of lowercase English letters.
* The lengths of S and T are between 1 and 100 (inclusive).
Input
Input is given from Standard Input in the following format:
S T
Output
Print the resulting string.
Examples
Input
oder atc
Output
atcoder
Input
humu humu
Output
humuhumu
### Response
```cpp
#include "bits/stdc++.h"
using namespace std;
string a,b;
int main()
{
cin>>a>>b;
cout<<b+a;
}
``` |
#include<bits/stdc++.h>
using namespace std;
int main(){
string s,t;
cin>>s>>t;
cout<<t+s;
}
| ### Prompt
In Cpp, your task is to solve the following problem:
Given are two strings S and T consisting of lowercase English letters. Concatenate T and S in this order, without space in between, and print the resulting string.
Constraints
* S and T are strings consisting of lowercase English letters.
* The lengths of S and T are between 1 and 100 (inclusive).
Input
Input is given from Standard Input in the following format:
S T
Output
Print the resulting string.
Examples
Input
oder atc
Output
atcoder
Input
humu humu
Output
humuhumu
### Response
```cpp
#include<bits/stdc++.h>
using namespace std;
int main(){
string s,t;
cin>>s>>t;
cout<<t+s;
}
``` |
#include<bits/stdc++.h>
using namespace std;
int main(){
string s, t;
cin >> s >> t;
cout << t << s;
}
| ### Prompt
Create a solution in cpp for the following problem:
Given are two strings S and T consisting of lowercase English letters. Concatenate T and S in this order, without space in between, and print the resulting string.
Constraints
* S and T are strings consisting of lowercase English letters.
* The lengths of S and T are between 1 and 100 (inclusive).
Input
Input is given from Standard Input in the following format:
S T
Output
Print the resulting string.
Examples
Input
oder atc
Output
atcoder
Input
humu humu
Output
humuhumu
### Response
```cpp
#include<bits/stdc++.h>
using namespace std;
int main(){
string s, t;
cin >> s >> t;
cout << t << s;
}
``` |
#include<bits/stdc++.h>
using namespace std;
int main(){
string a,s;
cin>>a>>s;
cout<<s<<a<<endl;
} | ### Prompt
Please create a solution in CPP to the following problem:
Given are two strings S and T consisting of lowercase English letters. Concatenate T and S in this order, without space in between, and print the resulting string.
Constraints
* S and T are strings consisting of lowercase English letters.
* The lengths of S and T are between 1 and 100 (inclusive).
Input
Input is given from Standard Input in the following format:
S T
Output
Print the resulting string.
Examples
Input
oder atc
Output
atcoder
Input
humu humu
Output
humuhumu
### Response
```cpp
#include<bits/stdc++.h>
using namespace std;
int main(){
string a,s;
cin>>a>>s;
cout<<s<<a<<endl;
}
``` |
#include <bits/stdc++.h>
using namespace std;
int main()
{
string b, a;
cin >> b >> a;
cout <<a+b;
}
| ### Prompt
Construct a Cpp code solution to the problem outlined:
Given are two strings S and T consisting of lowercase English letters. Concatenate T and S in this order, without space in between, and print the resulting string.
Constraints
* S and T are strings consisting of lowercase English letters.
* The lengths of S and T are between 1 and 100 (inclusive).
Input
Input is given from Standard Input in the following format:
S T
Output
Print the resulting string.
Examples
Input
oder atc
Output
atcoder
Input
humu humu
Output
humuhumu
### Response
```cpp
#include <bits/stdc++.h>
using namespace std;
int main()
{
string b, a;
cin >> b >> a;
cout <<a+b;
}
``` |
#include <iostream>
using namespace std;
string S;
string T;
int main(){
cin >> S >> T;
cout << T << S;
} | ### Prompt
In cpp, your task is to solve the following problem:
Given are two strings S and T consisting of lowercase English letters. Concatenate T and S in this order, without space in between, and print the resulting string.
Constraints
* S and T are strings consisting of lowercase English letters.
* The lengths of S and T are between 1 and 100 (inclusive).
Input
Input is given from Standard Input in the following format:
S T
Output
Print the resulting string.
Examples
Input
oder atc
Output
atcoder
Input
humu humu
Output
humuhumu
### Response
```cpp
#include <iostream>
using namespace std;
string S;
string T;
int main(){
cin >> S >> T;
cout << T << S;
}
``` |
#include<iostream>
using namespace std;
int main(){
string S, T;
cin>>S>>T;
cout<<(T+S);
return 0;
} | ### Prompt
Your task is to create a CPP solution to the following problem:
Given are two strings S and T consisting of lowercase English letters. Concatenate T and S in this order, without space in between, and print the resulting string.
Constraints
* S and T are strings consisting of lowercase English letters.
* The lengths of S and T are between 1 and 100 (inclusive).
Input
Input is given from Standard Input in the following format:
S T
Output
Print the resulting string.
Examples
Input
oder atc
Output
atcoder
Input
humu humu
Output
humuhumu
### Response
```cpp
#include<iostream>
using namespace std;
int main(){
string S, T;
cin>>S>>T;
cout<<(T+S);
return 0;
}
``` |
#include <stdio.h>
int main ()
{
char a[200], b[200];
scanf("%s %s", a, b) ;
printf("%s%s\n", b, a) ;
} | ### Prompt
Please create a solution in Cpp to the following problem:
Given are two strings S and T consisting of lowercase English letters. Concatenate T and S in this order, without space in between, and print the resulting string.
Constraints
* S and T are strings consisting of lowercase English letters.
* The lengths of S and T are between 1 and 100 (inclusive).
Input
Input is given from Standard Input in the following format:
S T
Output
Print the resulting string.
Examples
Input
oder atc
Output
atcoder
Input
humu humu
Output
humuhumu
### Response
```cpp
#include <stdio.h>
int main ()
{
char a[200], b[200];
scanf("%s %s", a, b) ;
printf("%s%s\n", b, a) ;
}
``` |
#include <stdio.h>
int main(){
char S[100],T[100];
scanf("%s %s",&S,&T);
printf("%s%s\n",T,S);
return 0;
} | ### Prompt
Please create a solution in Cpp to the following problem:
Given are two strings S and T consisting of lowercase English letters. Concatenate T and S in this order, without space in between, and print the resulting string.
Constraints
* S and T are strings consisting of lowercase English letters.
* The lengths of S and T are between 1 and 100 (inclusive).
Input
Input is given from Standard Input in the following format:
S T
Output
Print the resulting string.
Examples
Input
oder atc
Output
atcoder
Input
humu humu
Output
humuhumu
### Response
```cpp
#include <stdio.h>
int main(){
char S[100],T[100];
scanf("%s %s",&S,&T);
printf("%s%s\n",T,S);
return 0;
}
``` |
#include <iostream>
using namespace std;
int main(){
string x,y;
cin>>x>>y;
cout<<y<<x;
return 0;}
| ### Prompt
Please create a solution in Cpp to the following problem:
Given are two strings S and T consisting of lowercase English letters. Concatenate T and S in this order, without space in between, and print the resulting string.
Constraints
* S and T are strings consisting of lowercase English letters.
* The lengths of S and T are between 1 and 100 (inclusive).
Input
Input is given from Standard Input in the following format:
S T
Output
Print the resulting string.
Examples
Input
oder atc
Output
atcoder
Input
humu humu
Output
humuhumu
### Response
```cpp
#include <iostream>
using namespace std;
int main(){
string x,y;
cin>>x>>y;
cout<<y<<x;
return 0;}
``` |
#include <bits/stdc++.h>
using namespace std;
int main(){
string s1,s2;
cin>>s1>>s2;
cout<<s2+s1<<endl;
} | ### Prompt
Please provide a CPP coded solution to the problem described below:
Given are two strings S and T consisting of lowercase English letters. Concatenate T and S in this order, without space in between, and print the resulting string.
Constraints
* S and T are strings consisting of lowercase English letters.
* The lengths of S and T are between 1 and 100 (inclusive).
Input
Input is given from Standard Input in the following format:
S T
Output
Print the resulting string.
Examples
Input
oder atc
Output
atcoder
Input
humu humu
Output
humuhumu
### Response
```cpp
#include <bits/stdc++.h>
using namespace std;
int main(){
string s1,s2;
cin>>s1>>s2;
cout<<s2+s1<<endl;
}
``` |
#include <bits/stdc++.h>
using namespace std;
int main(){
string A, B;
cin >> A >>B;
cout << B <<A;
} | ### Prompt
Please create a solution in CPP to the following problem:
Given are two strings S and T consisting of lowercase English letters. Concatenate T and S in this order, without space in between, and print the resulting string.
Constraints
* S and T are strings consisting of lowercase English letters.
* The lengths of S and T are between 1 and 100 (inclusive).
Input
Input is given from Standard Input in the following format:
S T
Output
Print the resulting string.
Examples
Input
oder atc
Output
atcoder
Input
humu humu
Output
humuhumu
### Response
```cpp
#include <bits/stdc++.h>
using namespace std;
int main(){
string A, B;
cin >> A >>B;
cout << B <<A;
}
``` |
#include <iostream>
using namespace std;
string a,b;
int main(){
cin>>a>>b;
cout<<b<<a;
} | ### Prompt
Please formulate a CPP solution to the following problem:
Given are two strings S and T consisting of lowercase English letters. Concatenate T and S in this order, without space in between, and print the resulting string.
Constraints
* S and T are strings consisting of lowercase English letters.
* The lengths of S and T are between 1 and 100 (inclusive).
Input
Input is given from Standard Input in the following format:
S T
Output
Print the resulting string.
Examples
Input
oder atc
Output
atcoder
Input
humu humu
Output
humuhumu
### Response
```cpp
#include <iostream>
using namespace std;
string a,b;
int main(){
cin>>a>>b;
cout<<b<<a;
}
``` |
#include <bits/stdc++.h>
using namespace std;
int main(){
string a,b;
cin>>a>>b;
cout<<b<<a;
return 0;
} | ### Prompt
Please formulate a Cpp solution to the following problem:
Given are two strings S and T consisting of lowercase English letters. Concatenate T and S in this order, without space in between, and print the resulting string.
Constraints
* S and T are strings consisting of lowercase English letters.
* The lengths of S and T are between 1 and 100 (inclusive).
Input
Input is given from Standard Input in the following format:
S T
Output
Print the resulting string.
Examples
Input
oder atc
Output
atcoder
Input
humu humu
Output
humuhumu
### Response
```cpp
#include <bits/stdc++.h>
using namespace std;
int main(){
string a,b;
cin>>a>>b;
cout<<b<<a;
return 0;
}
``` |
#include <bits/stdc++.h>
using namespace std;
int main() {
string A, B;
cin >> A >> B;
cout << B + A;
} | ### Prompt
In cpp, your task is to solve the following problem:
Given are two strings S and T consisting of lowercase English letters. Concatenate T and S in this order, without space in between, and print the resulting string.
Constraints
* S and T are strings consisting of lowercase English letters.
* The lengths of S and T are between 1 and 100 (inclusive).
Input
Input is given from Standard Input in the following format:
S T
Output
Print the resulting string.
Examples
Input
oder atc
Output
atcoder
Input
humu humu
Output
humuhumu
### Response
```cpp
#include <bits/stdc++.h>
using namespace std;
int main() {
string A, B;
cin >> A >> B;
cout << B + A;
}
``` |
#include<iostream>
using namespace std;
int main(){
string s,t;cin>>s>>t;cout<<t<<s<<"\n";}
| ### Prompt
Generate a CPP solution to the following problem:
Given are two strings S and T consisting of lowercase English letters. Concatenate T and S in this order, without space in between, and print the resulting string.
Constraints
* S and T are strings consisting of lowercase English letters.
* The lengths of S and T are between 1 and 100 (inclusive).
Input
Input is given from Standard Input in the following format:
S T
Output
Print the resulting string.
Examples
Input
oder atc
Output
atcoder
Input
humu humu
Output
humuhumu
### Response
```cpp
#include<iostream>
using namespace std;
int main(){
string s,t;cin>>s>>t;cout<<t<<s<<"\n";}
``` |
#include <iostream>
using namespace std;
int main()
{
string t,s;
cin>>s>>t;
cout<<t<<s;
} | ### Prompt
Develop a solution in Cpp to the problem described below:
Given are two strings S and T consisting of lowercase English letters. Concatenate T and S in this order, without space in between, and print the resulting string.
Constraints
* S and T are strings consisting of lowercase English letters.
* The lengths of S and T are between 1 and 100 (inclusive).
Input
Input is given from Standard Input in the following format:
S T
Output
Print the resulting string.
Examples
Input
oder atc
Output
atcoder
Input
humu humu
Output
humuhumu
### Response
```cpp
#include <iostream>
using namespace std;
int main()
{
string t,s;
cin>>s>>t;
cout<<t<<s;
}
``` |
#include <bits/stdc++.h>
using namespace std;
string ss,s;
int main()
{
cin >> s >> ss;
cout << ss << s;
} | ### Prompt
Please formulate a CPP solution to the following problem:
Given are two strings S and T consisting of lowercase English letters. Concatenate T and S in this order, without space in between, and print the resulting string.
Constraints
* S and T are strings consisting of lowercase English letters.
* The lengths of S and T are between 1 and 100 (inclusive).
Input
Input is given from Standard Input in the following format:
S T
Output
Print the resulting string.
Examples
Input
oder atc
Output
atcoder
Input
humu humu
Output
humuhumu
### Response
```cpp
#include <bits/stdc++.h>
using namespace std;
string ss,s;
int main()
{
cin >> s >> ss;
cout << ss << s;
}
``` |
#include <bits/stdc++.h>
using namespace std;
int main(){
string S,T;
cin>>S>>T;
cout<<T+S;
}
| ### Prompt
Please create a solution in Cpp to the following problem:
Given are two strings S and T consisting of lowercase English letters. Concatenate T and S in this order, without space in between, and print the resulting string.
Constraints
* S and T are strings consisting of lowercase English letters.
* The lengths of S and T are between 1 and 100 (inclusive).
Input
Input is given from Standard Input in the following format:
S T
Output
Print the resulting string.
Examples
Input
oder atc
Output
atcoder
Input
humu humu
Output
humuhumu
### Response
```cpp
#include <bits/stdc++.h>
using namespace std;
int main(){
string S,T;
cin>>S>>T;
cout<<T+S;
}
``` |
#include<iostream>
#include<string>
using namespace std;
int main(){
string a,b;
cin>>a>>b;
cout<<b<<a<<endl;} | ### Prompt
Generate a Cpp solution to the following problem:
Given are two strings S and T consisting of lowercase English letters. Concatenate T and S in this order, without space in between, and print the resulting string.
Constraints
* S and T are strings consisting of lowercase English letters.
* The lengths of S and T are between 1 and 100 (inclusive).
Input
Input is given from Standard Input in the following format:
S T
Output
Print the resulting string.
Examples
Input
oder atc
Output
atcoder
Input
humu humu
Output
humuhumu
### Response
```cpp
#include<iostream>
#include<string>
using namespace std;
int main(){
string a,b;
cin>>a>>b;
cout<<b<<a<<endl;}
``` |
#include <bits/stdc++.h>
using namespace std;
int main(void){
string s,t;
cin>>s>>t;
cout<<t+s<<endl;
} | ### Prompt
Please provide a Cpp coded solution to the problem described below:
Given are two strings S and T consisting of lowercase English letters. Concatenate T and S in this order, without space in between, and print the resulting string.
Constraints
* S and T are strings consisting of lowercase English letters.
* The lengths of S and T are between 1 and 100 (inclusive).
Input
Input is given from Standard Input in the following format:
S T
Output
Print the resulting string.
Examples
Input
oder atc
Output
atcoder
Input
humu humu
Output
humuhumu
### Response
```cpp
#include <bits/stdc++.h>
using namespace std;
int main(void){
string s,t;
cin>>s>>t;
cout<<t+s<<endl;
}
``` |
#include <iostream>
using namespace std;
int main(){
string S;
string T;
cin >> S >> T;
cout << T+S;
} | ### Prompt
Create a solution in Cpp for the following problem:
Given are two strings S and T consisting of lowercase English letters. Concatenate T and S in this order, without space in between, and print the resulting string.
Constraints
* S and T are strings consisting of lowercase English letters.
* The lengths of S and T are between 1 and 100 (inclusive).
Input
Input is given from Standard Input in the following format:
S T
Output
Print the resulting string.
Examples
Input
oder atc
Output
atcoder
Input
humu humu
Output
humuhumu
### Response
```cpp
#include <iostream>
using namespace std;
int main(){
string S;
string T;
cin >> S >> T;
cout << T+S;
}
``` |
#include <stdio.h>
int main(){
char S[101],T[101];
scanf("%s %s", &S, &T);
printf("%s%s", T,S);
return 0;}
| ### Prompt
Create a solution in Cpp for the following problem:
Given are two strings S and T consisting of lowercase English letters. Concatenate T and S in this order, without space in between, and print the resulting string.
Constraints
* S and T are strings consisting of lowercase English letters.
* The lengths of S and T are between 1 and 100 (inclusive).
Input
Input is given from Standard Input in the following format:
S T
Output
Print the resulting string.
Examples
Input
oder atc
Output
atcoder
Input
humu humu
Output
humuhumu
### Response
```cpp
#include <stdio.h>
int main(){
char S[101],T[101];
scanf("%s %s", &S, &T);
printf("%s%s", T,S);
return 0;}
``` |
//vansh
#include <stdio.h>
char S[110];
char T[110];
int main(){
scanf("%s%s",S,T);
printf("%s%s\n",T,S);
} | ### Prompt
Create a solution in cpp for the following problem:
Given are two strings S and T consisting of lowercase English letters. Concatenate T and S in this order, without space in between, and print the resulting string.
Constraints
* S and T are strings consisting of lowercase English letters.
* The lengths of S and T are between 1 and 100 (inclusive).
Input
Input is given from Standard Input in the following format:
S T
Output
Print the resulting string.
Examples
Input
oder atc
Output
atcoder
Input
humu humu
Output
humuhumu
### Response
```cpp
//vansh
#include <stdio.h>
char S[110];
char T[110];
int main(){
scanf("%s%s",S,T);
printf("%s%s\n",T,S);
}
``` |
#include<bits/stdc++.h>
using namespace std;
string s,t;
int main(){
cin>>s>>t;
t+=s;
cout<<t<<endl;
}
| ### Prompt
Generate a CPP solution to the following problem:
Given are two strings S and T consisting of lowercase English letters. Concatenate T and S in this order, without space in between, and print the resulting string.
Constraints
* S and T are strings consisting of lowercase English letters.
* The lengths of S and T are between 1 and 100 (inclusive).
Input
Input is given from Standard Input in the following format:
S T
Output
Print the resulting string.
Examples
Input
oder atc
Output
atcoder
Input
humu humu
Output
humuhumu
### Response
```cpp
#include<bits/stdc++.h>
using namespace std;
string s,t;
int main(){
cin>>s>>t;
t+=s;
cout<<t<<endl;
}
``` |
#include<bits/stdc++.h>
using namespace std;;
int main(){
string s,t; cin>>s>>t;
cout<<t<<s<<endl;
} | ### Prompt
In CPP, your task is to solve the following problem:
Given are two strings S and T consisting of lowercase English letters. Concatenate T and S in this order, without space in between, and print the resulting string.
Constraints
* S and T are strings consisting of lowercase English letters.
* The lengths of S and T are between 1 and 100 (inclusive).
Input
Input is given from Standard Input in the following format:
S T
Output
Print the resulting string.
Examples
Input
oder atc
Output
atcoder
Input
humu humu
Output
humuhumu
### Response
```cpp
#include<bits/stdc++.h>
using namespace std;;
int main(){
string s,t; cin>>s>>t;
cout<<t<<s<<endl;
}
``` |
#include <bits/stdc++.h>
using namespace std;
int main(){
string S,T; cin >> S >> T;
cout << T << S << endl;
} | ### Prompt
Your task is to create a CPP solution to the following problem:
Given are two strings S and T consisting of lowercase English letters. Concatenate T and S in this order, without space in between, and print the resulting string.
Constraints
* S and T are strings consisting of lowercase English letters.
* The lengths of S and T are between 1 and 100 (inclusive).
Input
Input is given from Standard Input in the following format:
S T
Output
Print the resulting string.
Examples
Input
oder atc
Output
atcoder
Input
humu humu
Output
humuhumu
### Response
```cpp
#include <bits/stdc++.h>
using namespace std;
int main(){
string S,T; cin >> S >> T;
cout << T << S << endl;
}
``` |
#include <iostream>
using namespace std;
int main() {
string S, T;
cin >> S >> T;
cout << T << S << "\n";
} | ### Prompt
Create a solution in CPP for the following problem:
Given are two strings S and T consisting of lowercase English letters. Concatenate T and S in this order, without space in between, and print the resulting string.
Constraints
* S and T are strings consisting of lowercase English letters.
* The lengths of S and T are between 1 and 100 (inclusive).
Input
Input is given from Standard Input in the following format:
S T
Output
Print the resulting string.
Examples
Input
oder atc
Output
atcoder
Input
humu humu
Output
humuhumu
### Response
```cpp
#include <iostream>
using namespace std;
int main() {
string S, T;
cin >> S >> T;
cout << T << S << "\n";
}
``` |
#include <bits/stdc++.h>
using namespace std;
int main(void){
string s,t;
cin>>s>>t;
cout<<t<<s;
}
| ### Prompt
Develop a solution in cpp to the problem described below:
Given are two strings S and T consisting of lowercase English letters. Concatenate T and S in this order, without space in between, and print the resulting string.
Constraints
* S and T are strings consisting of lowercase English letters.
* The lengths of S and T are between 1 and 100 (inclusive).
Input
Input is given from Standard Input in the following format:
S T
Output
Print the resulting string.
Examples
Input
oder atc
Output
atcoder
Input
humu humu
Output
humuhumu
### Response
```cpp
#include <bits/stdc++.h>
using namespace std;
int main(void){
string s,t;
cin>>s>>t;
cout<<t<<s;
}
``` |
#include<bits/stdc++.h>
using namespace std;
int main()
{
string s,b; cin>>s>>b;
cout<<b+s;
}
| ### Prompt
Your task is to create a CPP solution to the following problem:
Given are two strings S and T consisting of lowercase English letters. Concatenate T and S in this order, without space in between, and print the resulting string.
Constraints
* S and T are strings consisting of lowercase English letters.
* The lengths of S and T are between 1 and 100 (inclusive).
Input
Input is given from Standard Input in the following format:
S T
Output
Print the resulting string.
Examples
Input
oder atc
Output
atcoder
Input
humu humu
Output
humuhumu
### Response
```cpp
#include<bits/stdc++.h>
using namespace std;
int main()
{
string s,b; cin>>s>>b;
cout<<b+s;
}
``` |
#include<bits/stdc++.h>
using namespace std;
int main()
{
string s,ss;
cin>>s>>ss;
cout<<ss+s<<endl;
}
| ### Prompt
Construct a Cpp code solution to the problem outlined:
Given are two strings S and T consisting of lowercase English letters. Concatenate T and S in this order, without space in between, and print the resulting string.
Constraints
* S and T are strings consisting of lowercase English letters.
* The lengths of S and T are between 1 and 100 (inclusive).
Input
Input is given from Standard Input in the following format:
S T
Output
Print the resulting string.
Examples
Input
oder atc
Output
atcoder
Input
humu humu
Output
humuhumu
### Response
```cpp
#include<bits/stdc++.h>
using namespace std;
int main()
{
string s,ss;
cin>>s>>ss;
cout<<ss+s<<endl;
}
``` |
#include <stdio.h>
int main(){
int s[100];
int t[100];
scanf ("%s %s",s,t);
printf("%s%s\n",t,s);
return 0;
} | ### Prompt
Please provide a cpp coded solution to the problem described below:
Given are two strings S and T consisting of lowercase English letters. Concatenate T and S in this order, without space in between, and print the resulting string.
Constraints
* S and T are strings consisting of lowercase English letters.
* The lengths of S and T are between 1 and 100 (inclusive).
Input
Input is given from Standard Input in the following format:
S T
Output
Print the resulting string.
Examples
Input
oder atc
Output
atcoder
Input
humu humu
Output
humuhumu
### Response
```cpp
#include <stdio.h>
int main(){
int s[100];
int t[100];
scanf ("%s %s",s,t);
printf("%s%s\n",t,s);
return 0;
}
``` |
#include <iostream>
#include <string>
int main(){std::string s,t;std::cin>>s>>t;std::cout<<t<<s<<"\n";} | ### Prompt
Develop a solution in CPP to the problem described below:
Given are two strings S and T consisting of lowercase English letters. Concatenate T and S in this order, without space in between, and print the resulting string.
Constraints
* S and T are strings consisting of lowercase English letters.
* The lengths of S and T are between 1 and 100 (inclusive).
Input
Input is given from Standard Input in the following format:
S T
Output
Print the resulting string.
Examples
Input
oder atc
Output
atcoder
Input
humu humu
Output
humuhumu
### Response
```cpp
#include <iostream>
#include <string>
int main(){std::string s,t;std::cin>>s>>t;std::cout<<t<<s<<"\n";}
``` |
#include<iostream>
using namespace std;
int main(){
string S,T;
cin >> S >> T;
cout << T+S << endl;
}
| ### Prompt
Please provide a Cpp coded solution to the problem described below:
Given are two strings S and T consisting of lowercase English letters. Concatenate T and S in this order, without space in between, and print the resulting string.
Constraints
* S and T are strings consisting of lowercase English letters.
* The lengths of S and T are between 1 and 100 (inclusive).
Input
Input is given from Standard Input in the following format:
S T
Output
Print the resulting string.
Examples
Input
oder atc
Output
atcoder
Input
humu humu
Output
humuhumu
### Response
```cpp
#include<iostream>
using namespace std;
int main(){
string S,T;
cin >> S >> T;
cout << T+S << endl;
}
``` |
#include <iostream>
using namespace std;
int main()
{
string S, T;
cin >> S;
cin >> T;
cout << T + S;
} | ### Prompt
Your task is to create a cpp solution to the following problem:
Given are two strings S and T consisting of lowercase English letters. Concatenate T and S in this order, without space in between, and print the resulting string.
Constraints
* S and T are strings consisting of lowercase English letters.
* The lengths of S and T are between 1 and 100 (inclusive).
Input
Input is given from Standard Input in the following format:
S T
Output
Print the resulting string.
Examples
Input
oder atc
Output
atcoder
Input
humu humu
Output
humuhumu
### Response
```cpp
#include <iostream>
using namespace std;
int main()
{
string S, T;
cin >> S;
cin >> T;
cout << T + S;
}
``` |
#include <iostream>
#include <string>
using namespace std;
int main(){
string a,b;
cin>>a>>b;
cout<<b+a;
}
| ### Prompt
In CPP, your task is to solve the following problem:
Given are two strings S and T consisting of lowercase English letters. Concatenate T and S in this order, without space in between, and print the resulting string.
Constraints
* S and T are strings consisting of lowercase English letters.
* The lengths of S and T are between 1 and 100 (inclusive).
Input
Input is given from Standard Input in the following format:
S T
Output
Print the resulting string.
Examples
Input
oder atc
Output
atcoder
Input
humu humu
Output
humuhumu
### Response
```cpp
#include <iostream>
#include <string>
using namespace std;
int main(){
string a,b;
cin>>a>>b;
cout<<b+a;
}
``` |
#include <bits/stdc++.h>
using namespace std;
int main()
{
char a[101],b[101];
cin>>a>>b;
cout<<b<<a;
}
| ### Prompt
Your challenge is to write a CPP solution to the following problem:
Given are two strings S and T consisting of lowercase English letters. Concatenate T and S in this order, without space in between, and print the resulting string.
Constraints
* S and T are strings consisting of lowercase English letters.
* The lengths of S and T are between 1 and 100 (inclusive).
Input
Input is given from Standard Input in the following format:
S T
Output
Print the resulting string.
Examples
Input
oder atc
Output
atcoder
Input
humu humu
Output
humuhumu
### Response
```cpp
#include <bits/stdc++.h>
using namespace std;
int main()
{
char a[101],b[101];
cin>>a>>b;
cout<<b<<a;
}
``` |
#include <iostream>
using namespace std;
int main() {
int n; cin >> n;
int curr;
for(int i = 0; i < n; i++){
int x; cin >> x;
if (i == 0) curr = x - 1;
else{
if (x > curr) curr = x - 1;
else if (x == curr);
else {
cout << "No"; return 0;
}
}
}
cout << "Yes";
} | ### Prompt
Your challenge is to write a cpp solution to the following problem:
There are N squares arranged in a row from left to right. The height of the i-th square from the left is H_i.
For each square, you will perform either of the following operations once:
* Decrease the height of the square by 1.
* Do nothing.
Determine if it is possible to perform the operations so that the heights of the squares are non-decreasing from left to right.
Constraints
* All values in input are integers.
* 1 \leq N \leq 10^5
* 1 \leq H_i \leq 10^9
Input
Input is given from Standard Input in the following format:
N
H_1 H_2 ... H_N
Output
If it is possible to perform the operations so that the heights of the squares are non-decreasing from left to right, print `Yes`; otherwise, print `No`.
Examples
Input
5
1 2 1 1 3
Output
Yes
Input
4
1 3 2 1
Output
No
Input
5
1 2 3 4 5
Output
Yes
Input
1
1000000000
Output
Yes
### Response
```cpp
#include <iostream>
using namespace std;
int main() {
int n; cin >> n;
int curr;
for(int i = 0; i < n; i++){
int x; cin >> x;
if (i == 0) curr = x - 1;
else{
if (x > curr) curr = x - 1;
else if (x == curr);
else {
cout << "No"; return 0;
}
}
}
cout << "Yes";
}
``` |
#include <bits/stdc++.h>
using namespace std;
int n,a[100005];
signed main(){
scanf("%d",&n);
for(int i=1;i<=n;++i){
scanf("%d",&a[i]);
if(a[i]-a[i-1]>0) a[i]--;
if(a[i]<a[i-1]){
puts("No");
return 0;
}
}
puts("Yes");
}
| ### Prompt
In CPP, your task is to solve the following problem:
There are N squares arranged in a row from left to right. The height of the i-th square from the left is H_i.
For each square, you will perform either of the following operations once:
* Decrease the height of the square by 1.
* Do nothing.
Determine if it is possible to perform the operations so that the heights of the squares are non-decreasing from left to right.
Constraints
* All values in input are integers.
* 1 \leq N \leq 10^5
* 1 \leq H_i \leq 10^9
Input
Input is given from Standard Input in the following format:
N
H_1 H_2 ... H_N
Output
If it is possible to perform the operations so that the heights of the squares are non-decreasing from left to right, print `Yes`; otherwise, print `No`.
Examples
Input
5
1 2 1 1 3
Output
Yes
Input
4
1 3 2 1
Output
No
Input
5
1 2 3 4 5
Output
Yes
Input
1
1000000000
Output
Yes
### Response
```cpp
#include <bits/stdc++.h>
using namespace std;
int n,a[100005];
signed main(){
scanf("%d",&n);
for(int i=1;i<=n;++i){
scanf("%d",&a[i]);
if(a[i]-a[i-1]>0) a[i]--;
if(a[i]<a[i-1]){
puts("No");
return 0;
}
}
puts("Yes");
}
``` |
#include<bits/stdc++.h>
using namespace std;
#define debug 1
int main() {
int n;
cin>>n;
int h,h_last=0;
for(int i=0;i<n;i++) {
scanf("%d",&h);
if(h>h_last) h--;
else if(h==h_last) ;
else if(h<h_last) {
cout<<"No"<<endl;
return 0;
}
h_last=h;
}
cout<<"Yes"<<endl;
return 0;
} | ### Prompt
Create a solution in cpp for the following problem:
There are N squares arranged in a row from left to right. The height of the i-th square from the left is H_i.
For each square, you will perform either of the following operations once:
* Decrease the height of the square by 1.
* Do nothing.
Determine if it is possible to perform the operations so that the heights of the squares are non-decreasing from left to right.
Constraints
* All values in input are integers.
* 1 \leq N \leq 10^5
* 1 \leq H_i \leq 10^9
Input
Input is given from Standard Input in the following format:
N
H_1 H_2 ... H_N
Output
If it is possible to perform the operations so that the heights of the squares are non-decreasing from left to right, print `Yes`; otherwise, print `No`.
Examples
Input
5
1 2 1 1 3
Output
Yes
Input
4
1 3 2 1
Output
No
Input
5
1 2 3 4 5
Output
Yes
Input
1
1000000000
Output
Yes
### Response
```cpp
#include<bits/stdc++.h>
using namespace std;
#define debug 1
int main() {
int n;
cin>>n;
int h,h_last=0;
for(int i=0;i<n;i++) {
scanf("%d",&h);
if(h>h_last) h--;
else if(h==h_last) ;
else if(h<h_last) {
cout<<"No"<<endl;
return 0;
}
h_last=h;
}
cout<<"Yes"<<endl;
return 0;
}
``` |
#include <cstdio>
#define rep(i,n) for(int i=0;i<(n);i++)
using namespace std;
int main(){
int n,h[100000];
scanf("%d",&n);
rep(i,n) scanf("%d",h+i);
for(int i=n-2;i>=0;i--){
if(h[i]==h[i+1]+1) h[i]--;
else if(h[i]>h[i+1]+1){
puts("No");
return 0;
}
}
puts("Yes");
return 0;
}
| ### Prompt
Please formulate a Cpp solution to the following problem:
There are N squares arranged in a row from left to right. The height of the i-th square from the left is H_i.
For each square, you will perform either of the following operations once:
* Decrease the height of the square by 1.
* Do nothing.
Determine if it is possible to perform the operations so that the heights of the squares are non-decreasing from left to right.
Constraints
* All values in input are integers.
* 1 \leq N \leq 10^5
* 1 \leq H_i \leq 10^9
Input
Input is given from Standard Input in the following format:
N
H_1 H_2 ... H_N
Output
If it is possible to perform the operations so that the heights of the squares are non-decreasing from left to right, print `Yes`; otherwise, print `No`.
Examples
Input
5
1 2 1 1 3
Output
Yes
Input
4
1 3 2 1
Output
No
Input
5
1 2 3 4 5
Output
Yes
Input
1
1000000000
Output
Yes
### Response
```cpp
#include <cstdio>
#define rep(i,n) for(int i=0;i<(n);i++)
using namespace std;
int main(){
int n,h[100000];
scanf("%d",&n);
rep(i,n) scanf("%d",h+i);
for(int i=n-2;i>=0;i--){
if(h[i]==h[i+1]+1) h[i]--;
else if(h[i]>h[i+1]+1){
puts("No");
return 0;
}
}
puts("Yes");
return 0;
}
``` |
#include<iostream>
#include<algorithm>
using namespace std;
int n,a[100001],h[100001];
int main(){
ios::sync_with_stdio(false);
cin>>n;
for(register int i=1;i<=n;i++){
cin>>a[i];
if(a[i]<h[i-1]-1){
puts("No");
return 0;
}
h[i]=max(h[i-1],a[i]);
}
puts("Yes");
} | ### Prompt
Your challenge is to write a CPP solution to the following problem:
There are N squares arranged in a row from left to right. The height of the i-th square from the left is H_i.
For each square, you will perform either of the following operations once:
* Decrease the height of the square by 1.
* Do nothing.
Determine if it is possible to perform the operations so that the heights of the squares are non-decreasing from left to right.
Constraints
* All values in input are integers.
* 1 \leq N \leq 10^5
* 1 \leq H_i \leq 10^9
Input
Input is given from Standard Input in the following format:
N
H_1 H_2 ... H_N
Output
If it is possible to perform the operations so that the heights of the squares are non-decreasing from left to right, print `Yes`; otherwise, print `No`.
Examples
Input
5
1 2 1 1 3
Output
Yes
Input
4
1 3 2 1
Output
No
Input
5
1 2 3 4 5
Output
Yes
Input
1
1000000000
Output
Yes
### Response
```cpp
#include<iostream>
#include<algorithm>
using namespace std;
int n,a[100001],h[100001];
int main(){
ios::sync_with_stdio(false);
cin>>n;
for(register int i=1;i<=n;i++){
cin>>a[i];
if(a[i]<h[i-1]-1){
puts("No");
return 0;
}
h[i]=max(h[i-1],a[i]);
}
puts("Yes");
}
``` |
#include <bits/stdc++.h>
using namespace std;
long long n,i,a[100000];
int main(){
for(cin>>n>>a[0],i=1;i<n;i++){
cin>>a[i];
if(a[i]>a[i-1])a[i]--;
else if(a[i]==a[i-1])continue;
else if(a[i]<a[i-1])return cout<<"No",0;
}
cout<<"Yes";
} | ### Prompt
Construct a Cpp code solution to the problem outlined:
There are N squares arranged in a row from left to right. The height of the i-th square from the left is H_i.
For each square, you will perform either of the following operations once:
* Decrease the height of the square by 1.
* Do nothing.
Determine if it is possible to perform the operations so that the heights of the squares are non-decreasing from left to right.
Constraints
* All values in input are integers.
* 1 \leq N \leq 10^5
* 1 \leq H_i \leq 10^9
Input
Input is given from Standard Input in the following format:
N
H_1 H_2 ... H_N
Output
If it is possible to perform the operations so that the heights of the squares are non-decreasing from left to right, print `Yes`; otherwise, print `No`.
Examples
Input
5
1 2 1 1 3
Output
Yes
Input
4
1 3 2 1
Output
No
Input
5
1 2 3 4 5
Output
Yes
Input
1
1000000000
Output
Yes
### Response
```cpp
#include <bits/stdc++.h>
using namespace std;
long long n,i,a[100000];
int main(){
for(cin>>n>>a[0],i=1;i<n;i++){
cin>>a[i];
if(a[i]>a[i-1])a[i]--;
else if(a[i]==a[i-1])continue;
else if(a[i]<a[i-1])return cout<<"No",0;
}
cout<<"Yes";
}
``` |
#include <bits/stdc++.h>
#include <math.h>
using namespace std;
int main(){
int N;
cin>>N;
int H[N];
for(int i=0;i<N;i++) cin>>H[i];
for(int i=N-1;i>=0;i--){
if(H[i]<H[i-1]-1){
cout<<"No"<<endl;
break;
}else if(H[i]<H[i-1]) H[i-1]--;
if(i==0) cout<<"Yes"<<endl;
}
}
| ### Prompt
Your task is to create a CPP solution to the following problem:
There are N squares arranged in a row from left to right. The height of the i-th square from the left is H_i.
For each square, you will perform either of the following operations once:
* Decrease the height of the square by 1.
* Do nothing.
Determine if it is possible to perform the operations so that the heights of the squares are non-decreasing from left to right.
Constraints
* All values in input are integers.
* 1 \leq N \leq 10^5
* 1 \leq H_i \leq 10^9
Input
Input is given from Standard Input in the following format:
N
H_1 H_2 ... H_N
Output
If it is possible to perform the operations so that the heights of the squares are non-decreasing from left to right, print `Yes`; otherwise, print `No`.
Examples
Input
5
1 2 1 1 3
Output
Yes
Input
4
1 3 2 1
Output
No
Input
5
1 2 3 4 5
Output
Yes
Input
1
1000000000
Output
Yes
### Response
```cpp
#include <bits/stdc++.h>
#include <math.h>
using namespace std;
int main(){
int N;
cin>>N;
int H[N];
for(int i=0;i<N;i++) cin>>H[i];
for(int i=N-1;i>=0;i--){
if(H[i]<H[i-1]-1){
cout<<"No"<<endl;
break;
}else if(H[i]<H[i-1]) H[i-1]--;
if(i==0) cout<<"Yes"<<endl;
}
}
``` |
#include<bits/stdc++.h>
using namespace std;
int n,h[100000];
int main()
{
cin>>n;
for(int i=0;i<n;i++)
{
cin>>h[i];
}
for(int i=n-1;i>0;i--)
{
if(h[i]>=h[i-1])
continue;
if(h[i]<h[i-1]-1)
{
cout<<"No";
return 0;
}
h[i-1]--;
}
cout<<"Yes";
return 0;
}
| ### Prompt
Please provide a cpp coded solution to the problem described below:
There are N squares arranged in a row from left to right. The height of the i-th square from the left is H_i.
For each square, you will perform either of the following operations once:
* Decrease the height of the square by 1.
* Do nothing.
Determine if it is possible to perform the operations so that the heights of the squares are non-decreasing from left to right.
Constraints
* All values in input are integers.
* 1 \leq N \leq 10^5
* 1 \leq H_i \leq 10^9
Input
Input is given from Standard Input in the following format:
N
H_1 H_2 ... H_N
Output
If it is possible to perform the operations so that the heights of the squares are non-decreasing from left to right, print `Yes`; otherwise, print `No`.
Examples
Input
5
1 2 1 1 3
Output
Yes
Input
4
1 3 2 1
Output
No
Input
5
1 2 3 4 5
Output
Yes
Input
1
1000000000
Output
Yes
### Response
```cpp
#include<bits/stdc++.h>
using namespace std;
int n,h[100000];
int main()
{
cin>>n;
for(int i=0;i<n;i++)
{
cin>>h[i];
}
for(int i=n-1;i>0;i--)
{
if(h[i]>=h[i-1])
continue;
if(h[i]<h[i-1]-1)
{
cout<<"No";
return 0;
}
h[i-1]--;
}
cout<<"Yes";
return 0;
}
``` |
#include<cstdio>
#include<algorithm>
using namespace std;
int n,maxn;
int main(){
scanf("%d",&n);
for(int i=1;i<=n;i++){
int x;
scanf("%d",&x);
if(x<maxn){
puts("No");
return 0;
}
else if(x>maxn)
maxn=x-1;
}
puts("Yes");
return 0;
} | ### Prompt
Construct a cpp code solution to the problem outlined:
There are N squares arranged in a row from left to right. The height of the i-th square from the left is H_i.
For each square, you will perform either of the following operations once:
* Decrease the height of the square by 1.
* Do nothing.
Determine if it is possible to perform the operations so that the heights of the squares are non-decreasing from left to right.
Constraints
* All values in input are integers.
* 1 \leq N \leq 10^5
* 1 \leq H_i \leq 10^9
Input
Input is given from Standard Input in the following format:
N
H_1 H_2 ... H_N
Output
If it is possible to perform the operations so that the heights of the squares are non-decreasing from left to right, print `Yes`; otherwise, print `No`.
Examples
Input
5
1 2 1 1 3
Output
Yes
Input
4
1 3 2 1
Output
No
Input
5
1 2 3 4 5
Output
Yes
Input
1
1000000000
Output
Yes
### Response
```cpp
#include<cstdio>
#include<algorithm>
using namespace std;
int n,maxn;
int main(){
scanf("%d",&n);
for(int i=1;i<=n;i++){
int x;
scanf("%d",&x);
if(x<maxn){
puts("No");
return 0;
}
else if(x>maxn)
maxn=x-1;
}
puts("Yes");
return 0;
}
``` |
#include <bits/stdc++.h>
using namespace std;
int main() {
int N;
cin >> N;
int ma = 0;
bool res = true;
for (int i = 0; i < N; ++i) {
int a;
cin >> a;
if (ma - a >= 2) res = false;
ma = max(ma, a);
}
if (res) puts("Yes");
else puts("No");
} | ### Prompt
In CPP, your task is to solve the following problem:
There are N squares arranged in a row from left to right. The height of the i-th square from the left is H_i.
For each square, you will perform either of the following operations once:
* Decrease the height of the square by 1.
* Do nothing.
Determine if it is possible to perform the operations so that the heights of the squares are non-decreasing from left to right.
Constraints
* All values in input are integers.
* 1 \leq N \leq 10^5
* 1 \leq H_i \leq 10^9
Input
Input is given from Standard Input in the following format:
N
H_1 H_2 ... H_N
Output
If it is possible to perform the operations so that the heights of the squares are non-decreasing from left to right, print `Yes`; otherwise, print `No`.
Examples
Input
5
1 2 1 1 3
Output
Yes
Input
4
1 3 2 1
Output
No
Input
5
1 2 3 4 5
Output
Yes
Input
1
1000000000
Output
Yes
### Response
```cpp
#include <bits/stdc++.h>
using namespace std;
int main() {
int N;
cin >> N;
int ma = 0;
bool res = true;
for (int i = 0; i < N; ++i) {
int a;
cin >> a;
if (ma - a >= 2) res = false;
ma = max(ma, a);
}
if (res) puts("Yes");
else puts("No");
}
``` |
#include<bits/stdc++.h>
using namespace std;
int main(){
int n,m=0;
cin>>n;
string ans="Yes";
vector<int> c(n);
for(int i=0;i<n;i++){
cin>>c[i];
if(m-c[i]>=2){cout<<"No";return 0;}
m=max(m,c[i]);
}
cout<<ans;
}
| ### Prompt
Please provide a cpp coded solution to the problem described below:
There are N squares arranged in a row from left to right. The height of the i-th square from the left is H_i.
For each square, you will perform either of the following operations once:
* Decrease the height of the square by 1.
* Do nothing.
Determine if it is possible to perform the operations so that the heights of the squares are non-decreasing from left to right.
Constraints
* All values in input are integers.
* 1 \leq N \leq 10^5
* 1 \leq H_i \leq 10^9
Input
Input is given from Standard Input in the following format:
N
H_1 H_2 ... H_N
Output
If it is possible to perform the operations so that the heights of the squares are non-decreasing from left to right, print `Yes`; otherwise, print `No`.
Examples
Input
5
1 2 1 1 3
Output
Yes
Input
4
1 3 2 1
Output
No
Input
5
1 2 3 4 5
Output
Yes
Input
1
1000000000
Output
Yes
### Response
```cpp
#include<bits/stdc++.h>
using namespace std;
int main(){
int n,m=0;
cin>>n;
string ans="Yes";
vector<int> c(n);
for(int i=0;i<n;i++){
cin>>c[i];
if(m-c[i]>=2){cout<<"No";return 0;}
m=max(m,c[i]);
}
cout<<ans;
}
``` |
#include<cstdio>
int n,a[1000001],i;
int main()
{
scanf("%d",&n);
for(i=0;i<n;i++)
scanf("%d",&a[i]);
for(i=n-1;i>0;i--)
{
if(a[i]<a[i-1])
a[i-1]--;
if(a[i-1]==0||a[i-1]>a[i])
{
printf("No\n");
return 0;
}
}
printf("Yes\n");
return 0;
} | ### Prompt
Generate a CPP solution to the following problem:
There are N squares arranged in a row from left to right. The height of the i-th square from the left is H_i.
For each square, you will perform either of the following operations once:
* Decrease the height of the square by 1.
* Do nothing.
Determine if it is possible to perform the operations so that the heights of the squares are non-decreasing from left to right.
Constraints
* All values in input are integers.
* 1 \leq N \leq 10^5
* 1 \leq H_i \leq 10^9
Input
Input is given from Standard Input in the following format:
N
H_1 H_2 ... H_N
Output
If it is possible to perform the operations so that the heights of the squares are non-decreasing from left to right, print `Yes`; otherwise, print `No`.
Examples
Input
5
1 2 1 1 3
Output
Yes
Input
4
1 3 2 1
Output
No
Input
5
1 2 3 4 5
Output
Yes
Input
1
1000000000
Output
Yes
### Response
```cpp
#include<cstdio>
int n,a[1000001],i;
int main()
{
scanf("%d",&n);
for(i=0;i<n;i++)
scanf("%d",&a[i]);
for(i=n-1;i>0;i--)
{
if(a[i]<a[i-1])
a[i-1]--;
if(a[i-1]==0||a[i-1]>a[i])
{
printf("No\n");
return 0;
}
}
printf("Yes\n");
return 0;
}
``` |
#include<iostream>
#include<algorithm>
using namespace std;
int main()
{
int n,h,b=0,i;
cin >> n;
for(i=0;i<n;i++){
cin >> h;
if(h<b){
cout << "No" << endl;
return 0;
}
if(h>b) b=h-1;
}
cout << "Yes" << endl;
return 0;
} | ### Prompt
Please formulate a Cpp solution to the following problem:
There are N squares arranged in a row from left to right. The height of the i-th square from the left is H_i.
For each square, you will perform either of the following operations once:
* Decrease the height of the square by 1.
* Do nothing.
Determine if it is possible to perform the operations so that the heights of the squares are non-decreasing from left to right.
Constraints
* All values in input are integers.
* 1 \leq N \leq 10^5
* 1 \leq H_i \leq 10^9
Input
Input is given from Standard Input in the following format:
N
H_1 H_2 ... H_N
Output
If it is possible to perform the operations so that the heights of the squares are non-decreasing from left to right, print `Yes`; otherwise, print `No`.
Examples
Input
5
1 2 1 1 3
Output
Yes
Input
4
1 3 2 1
Output
No
Input
5
1 2 3 4 5
Output
Yes
Input
1
1000000000
Output
Yes
### Response
```cpp
#include<iostream>
#include<algorithm>
using namespace std;
int main()
{
int n,h,b=0,i;
cin >> n;
for(i=0;i<n;i++){
cin >> h;
if(h<b){
cout << "No" << endl;
return 0;
}
if(h>b) b=h-1;
}
cout << "Yes" << endl;
return 0;
}
``` |
#include<iostream>
#include<algorithm>
using namespace std;
int i[114514];
int main(){
int a,b,c,d=0,e;
cin >>a>>i[0];
for(int n=1;n<a;n++){
cin >>i[n];
if(i[n]>i[n-1]) i[n]--;
if(i[n-1]>i[n]) d++;
}
if(d>0) cout <<"No\n";
else cout <<"Yes\n";
return 0;
} | ### Prompt
Construct a CPP code solution to the problem outlined:
There are N squares arranged in a row from left to right. The height of the i-th square from the left is H_i.
For each square, you will perform either of the following operations once:
* Decrease the height of the square by 1.
* Do nothing.
Determine if it is possible to perform the operations so that the heights of the squares are non-decreasing from left to right.
Constraints
* All values in input are integers.
* 1 \leq N \leq 10^5
* 1 \leq H_i \leq 10^9
Input
Input is given from Standard Input in the following format:
N
H_1 H_2 ... H_N
Output
If it is possible to perform the operations so that the heights of the squares are non-decreasing from left to right, print `Yes`; otherwise, print `No`.
Examples
Input
5
1 2 1 1 3
Output
Yes
Input
4
1 3 2 1
Output
No
Input
5
1 2 3 4 5
Output
Yes
Input
1
1000000000
Output
Yes
### Response
```cpp
#include<iostream>
#include<algorithm>
using namespace std;
int i[114514];
int main(){
int a,b,c,d=0,e;
cin >>a>>i[0];
for(int n=1;n<a;n++){
cin >>i[n];
if(i[n]>i[n-1]) i[n]--;
if(i[n-1]>i[n]) d++;
}
if(d>0) cout <<"No\n";
else cout <<"Yes\n";
return 0;
}
``` |
#include <bits/stdc++.h>
using namespace std;
int main()
{
int n;
cin>>n;
int a[n+3];
for(int i=1;i<=n;i++)
cin>>a[i];
for(int i=n-1;i>=1;i--)
{
if(a[i]-a[i+1]>=2)
{
cout<<"No";
return 0;
}
if(a[i]-a[i+1]==1)
a[i]--;
}
cout<<"Yes";
return 0;
} | ### Prompt
Generate a cpp solution to the following problem:
There are N squares arranged in a row from left to right. The height of the i-th square from the left is H_i.
For each square, you will perform either of the following operations once:
* Decrease the height of the square by 1.
* Do nothing.
Determine if it is possible to perform the operations so that the heights of the squares are non-decreasing from left to right.
Constraints
* All values in input are integers.
* 1 \leq N \leq 10^5
* 1 \leq H_i \leq 10^9
Input
Input is given from Standard Input in the following format:
N
H_1 H_2 ... H_N
Output
If it is possible to perform the operations so that the heights of the squares are non-decreasing from left to right, print `Yes`; otherwise, print `No`.
Examples
Input
5
1 2 1 1 3
Output
Yes
Input
4
1 3 2 1
Output
No
Input
5
1 2 3 4 5
Output
Yes
Input
1
1000000000
Output
Yes
### Response
```cpp
#include <bits/stdc++.h>
using namespace std;
int main()
{
int n;
cin>>n;
int a[n+3];
for(int i=1;i<=n;i++)
cin>>a[i];
for(int i=n-1;i>=1;i--)
{
if(a[i]-a[i+1]>=2)
{
cout<<"No";
return 0;
}
if(a[i]-a[i+1]==1)
a[i]--;
}
cout<<"Yes";
return 0;
}
``` |
#include <cstdio>
int n , a[100005];
int main()
{
scanf("%d" , &n);
for(int i = n ; i ; i --)
scanf("%d" , a + i);
for(int i = 2 ; i <= n ; i ++)
{
if(a[i] - a[i - 1] > 1)
return puts("No") & 0;
if(a[i] > a[i - 1])
a[i] --;
}
return puts("Yes") & 0;
} | ### Prompt
Develop a solution in Cpp to the problem described below:
There are N squares arranged in a row from left to right. The height of the i-th square from the left is H_i.
For each square, you will perform either of the following operations once:
* Decrease the height of the square by 1.
* Do nothing.
Determine if it is possible to perform the operations so that the heights of the squares are non-decreasing from left to right.
Constraints
* All values in input are integers.
* 1 \leq N \leq 10^5
* 1 \leq H_i \leq 10^9
Input
Input is given from Standard Input in the following format:
N
H_1 H_2 ... H_N
Output
If it is possible to perform the operations so that the heights of the squares are non-decreasing from left to right, print `Yes`; otherwise, print `No`.
Examples
Input
5
1 2 1 1 3
Output
Yes
Input
4
1 3 2 1
Output
No
Input
5
1 2 3 4 5
Output
Yes
Input
1
1000000000
Output
Yes
### Response
```cpp
#include <cstdio>
int n , a[100005];
int main()
{
scanf("%d" , &n);
for(int i = n ; i ; i --)
scanf("%d" , a + i);
for(int i = 2 ; i <= n ; i ++)
{
if(a[i] - a[i - 1] > 1)
return puts("No") & 0;
if(a[i] > a[i - 1])
a[i] --;
}
return puts("Yes") & 0;
}
``` |
#include<bits/stdc++.h>
using namespace std;
int a[100021];
int main()
{
int n;
cin>>n;
a[0]=-1;
for(int i=1;i<=n;i++)
{
cin>>a[i];
}
for(int i=1;i<=n;i++)
{
if(a[i-1]>a[i])
{
cout<<"No"<<endl;
return 0;
}
if(a[i]-1>=a[i-1])
{
a[i]-=1;
}
}
cout<<"Yes"<<endl;
} | ### Prompt
Construct a Cpp code solution to the problem outlined:
There are N squares arranged in a row from left to right. The height of the i-th square from the left is H_i.
For each square, you will perform either of the following operations once:
* Decrease the height of the square by 1.
* Do nothing.
Determine if it is possible to perform the operations so that the heights of the squares are non-decreasing from left to right.
Constraints
* All values in input are integers.
* 1 \leq N \leq 10^5
* 1 \leq H_i \leq 10^9
Input
Input is given from Standard Input in the following format:
N
H_1 H_2 ... H_N
Output
If it is possible to perform the operations so that the heights of the squares are non-decreasing from left to right, print `Yes`; otherwise, print `No`.
Examples
Input
5
1 2 1 1 3
Output
Yes
Input
4
1 3 2 1
Output
No
Input
5
1 2 3 4 5
Output
Yes
Input
1
1000000000
Output
Yes
### Response
```cpp
#include<bits/stdc++.h>
using namespace std;
int a[100021];
int main()
{
int n;
cin>>n;
a[0]=-1;
for(int i=1;i<=n;i++)
{
cin>>a[i];
}
for(int i=1;i<=n;i++)
{
if(a[i-1]>a[i])
{
cout<<"No"<<endl;
return 0;
}
if(a[i]-1>=a[i-1])
{
a[i]-=1;
}
}
cout<<"Yes"<<endl;
}
``` |
#include<cstdio>
#include<algorithm>
using namespace std;
int n,h[100001];
bool vis[100001];
int main()
{
scanf("%d",&n);
for(int i=1;i<=n;i++) scanf("%d",&h[i]);
for(int i=1;i<n;i++)
{
if(h[i-1]<h[i]&&h[i]>=h[i+1]) h[i]--;
if(h[i]>h[i+1])
{
puts("No");
return 0;
}
}
puts("Yes");
} | ### Prompt
Develop a solution in CPP to the problem described below:
There are N squares arranged in a row from left to right. The height of the i-th square from the left is H_i.
For each square, you will perform either of the following operations once:
* Decrease the height of the square by 1.
* Do nothing.
Determine if it is possible to perform the operations so that the heights of the squares are non-decreasing from left to right.
Constraints
* All values in input are integers.
* 1 \leq N \leq 10^5
* 1 \leq H_i \leq 10^9
Input
Input is given from Standard Input in the following format:
N
H_1 H_2 ... H_N
Output
If it is possible to perform the operations so that the heights of the squares are non-decreasing from left to right, print `Yes`; otherwise, print `No`.
Examples
Input
5
1 2 1 1 3
Output
Yes
Input
4
1 3 2 1
Output
No
Input
5
1 2 3 4 5
Output
Yes
Input
1
1000000000
Output
Yes
### Response
```cpp
#include<cstdio>
#include<algorithm>
using namespace std;
int n,h[100001];
bool vis[100001];
int main()
{
scanf("%d",&n);
for(int i=1;i<=n;i++) scanf("%d",&h[i]);
for(int i=1;i<n;i++)
{
if(h[i-1]<h[i]&&h[i]>=h[i+1]) h[i]--;
if(h[i]>h[i+1])
{
puts("No");
return 0;
}
}
puts("Yes");
}
``` |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.