output
stringlengths 52
181k
| instruction
stringlengths 296
182k
|
---|---|
#include<stdio.h>
int main()
{
char s[4];
scanf("%s",s);
if(s[0]!=s[1]&&s[0]!=s[2]&&s[1]!=s[2]){
printf("Yes\n");
}
else{
printf("No\n");
}
return 0;
} | ### Prompt
Please formulate a CPP solution to the following problem:
You are given a string S of length 3 consisting of `a`, `b` and `c`. Determine if S can be obtained by permuting `abc`.
Constraints
* |S|=3
* S consists of `a`, `b` and `c`.
Input
Input is given from Standard Input in the following format:
S
Output
If S can be obtained by permuting `abc`, print `Yes`; otherwise, print `No`.
Examples
Input
bac
Output
Yes
Input
bab
Output
No
Input
abc
Output
Yes
Input
aaa
Output
No
### Response
```cpp
#include<stdio.h>
int main()
{
char s[4];
scanf("%s",s);
if(s[0]!=s[1]&&s[0]!=s[2]&&s[1]!=s[2]){
printf("Yes\n");
}
else{
printf("No\n");
}
return 0;
}
``` |
#include<bits/stdc++.h>
using namespace std;
int main()
{
char a,b,c;
scanf("%c %c %c",&a,&b,&c);
if(a!=b&&a!=c&&b!=c)
printf("Yes");
else
printf("No");
return 0;
} | ### Prompt
Generate a CPP solution to the following problem:
You are given a string S of length 3 consisting of `a`, `b` and `c`. Determine if S can be obtained by permuting `abc`.
Constraints
* |S|=3
* S consists of `a`, `b` and `c`.
Input
Input is given from Standard Input in the following format:
S
Output
If S can be obtained by permuting `abc`, print `Yes`; otherwise, print `No`.
Examples
Input
bac
Output
Yes
Input
bab
Output
No
Input
abc
Output
Yes
Input
aaa
Output
No
### Response
```cpp
#include<bits/stdc++.h>
using namespace std;
int main()
{
char a,b,c;
scanf("%c %c %c",&a,&b,&c);
if(a!=b&&a!=c&&b!=c)
printf("Yes");
else
printf("No");
return 0;
}
``` |
#include <bits/stdc++.h>
using namespace std;
int main(){
string s;
cin>>s;
sort(s.begin(),s.end());//cout<<s;
if(s[0]=='a'&&s[1]=='b'&&s[2]=='c')cout<<"Yes";
else cout<<"No";
}
| ### Prompt
Please create a solution in Cpp to the following problem:
You are given a string S of length 3 consisting of `a`, `b` and `c`. Determine if S can be obtained by permuting `abc`.
Constraints
* |S|=3
* S consists of `a`, `b` and `c`.
Input
Input is given from Standard Input in the following format:
S
Output
If S can be obtained by permuting `abc`, print `Yes`; otherwise, print `No`.
Examples
Input
bac
Output
Yes
Input
bab
Output
No
Input
abc
Output
Yes
Input
aaa
Output
No
### Response
```cpp
#include <bits/stdc++.h>
using namespace std;
int main(){
string s;
cin>>s;
sort(s.begin(),s.end());//cout<<s;
if(s[0]=='a'&&s[1]=='b'&&s[2]=='c')cout<<"Yes";
else cout<<"No";
}
``` |
#include<stdio.h>
int main() {
char S[4];
scanf("%s", S);
if (S[0] != S[1] && S[1] != S[2] && S[2] != S[0]) {
printf("Yes\n");
}
else {
printf("No\n");
}
} | ### Prompt
Please provide a cpp coded solution to the problem described below:
You are given a string S of length 3 consisting of `a`, `b` and `c`. Determine if S can be obtained by permuting `abc`.
Constraints
* |S|=3
* S consists of `a`, `b` and `c`.
Input
Input is given from Standard Input in the following format:
S
Output
If S can be obtained by permuting `abc`, print `Yes`; otherwise, print `No`.
Examples
Input
bac
Output
Yes
Input
bab
Output
No
Input
abc
Output
Yes
Input
aaa
Output
No
### Response
```cpp
#include<stdio.h>
int main() {
char S[4];
scanf("%s", S);
if (S[0] != S[1] && S[1] != S[2] && S[2] != S[0]) {
printf("Yes\n");
}
else {
printf("No\n");
}
}
``` |
#include<bits/stdc++.h>
using namespace std;
int main() {
string s;
cin >> s;
sort(begin(s), end(s));
cout << (s == "abc" ? "Yes" : "No") << endl;
}
| ### Prompt
Generate a cpp solution to the following problem:
You are given a string S of length 3 consisting of `a`, `b` and `c`. Determine if S can be obtained by permuting `abc`.
Constraints
* |S|=3
* S consists of `a`, `b` and `c`.
Input
Input is given from Standard Input in the following format:
S
Output
If S can be obtained by permuting `abc`, print `Yes`; otherwise, print `No`.
Examples
Input
bac
Output
Yes
Input
bab
Output
No
Input
abc
Output
Yes
Input
aaa
Output
No
### Response
```cpp
#include<bits/stdc++.h>
using namespace std;
int main() {
string s;
cin >> s;
sort(begin(s), end(s));
cout << (s == "abc" ? "Yes" : "No") << endl;
}
``` |
#include<iostream>
int main(){char s[3];std::cin>>s;std::cout<<((s[0]!=s[1]&&s[1]!=s[2]&&s[0]!=s[2])?"Yes":"No");} | ### Prompt
Create a solution in cpp for the following problem:
You are given a string S of length 3 consisting of `a`, `b` and `c`. Determine if S can be obtained by permuting `abc`.
Constraints
* |S|=3
* S consists of `a`, `b` and `c`.
Input
Input is given from Standard Input in the following format:
S
Output
If S can be obtained by permuting `abc`, print `Yes`; otherwise, print `No`.
Examples
Input
bac
Output
Yes
Input
bab
Output
No
Input
abc
Output
Yes
Input
aaa
Output
No
### Response
```cpp
#include<iostream>
int main(){char s[3];std::cin>>s;std::cout<<((s[0]!=s[1]&&s[1]!=s[2]&&s[0]!=s[2])?"Yes":"No");}
``` |
#include <bits/stdc++.h>
using namespace std;
int main(){
string h;
cin>>h;
if(h[0]!=h[1]&&h[0]!=h[2]&&h[2]!=h[1]) cout<<"Yes"<<endl;
else cout<<"No"<<endl;
} | ### Prompt
Your challenge is to write a Cpp solution to the following problem:
You are given a string S of length 3 consisting of `a`, `b` and `c`. Determine if S can be obtained by permuting `abc`.
Constraints
* |S|=3
* S consists of `a`, `b` and `c`.
Input
Input is given from Standard Input in the following format:
S
Output
If S can be obtained by permuting `abc`, print `Yes`; otherwise, print `No`.
Examples
Input
bac
Output
Yes
Input
bab
Output
No
Input
abc
Output
Yes
Input
aaa
Output
No
### Response
```cpp
#include <bits/stdc++.h>
using namespace std;
int main(){
string h;
cin>>h;
if(h[0]!=h[1]&&h[0]!=h[2]&&h[2]!=h[1]) cout<<"Yes"<<endl;
else cout<<"No"<<endl;
}
``` |
#include <bits/stdc++.h>
using namespace std;
int main() {
string S;
cin >> S;
sort(S.begin(), S.end());
if(S == "abc") cout << "Yes\n";
else cout << "No\n";
} | ### Prompt
Your challenge is to write a cpp solution to the following problem:
You are given a string S of length 3 consisting of `a`, `b` and `c`. Determine if S can be obtained by permuting `abc`.
Constraints
* |S|=3
* S consists of `a`, `b` and `c`.
Input
Input is given from Standard Input in the following format:
S
Output
If S can be obtained by permuting `abc`, print `Yes`; otherwise, print `No`.
Examples
Input
bac
Output
Yes
Input
bab
Output
No
Input
abc
Output
Yes
Input
aaa
Output
No
### Response
```cpp
#include <bits/stdc++.h>
using namespace std;
int main() {
string S;
cin >> S;
sort(S.begin(), S.end());
if(S == "abc") cout << "Yes\n";
else cout << "No\n";
}
``` |
#import<ios>
#define g getchar()
int main(){printf(g^g^g&3?"No":"Yes");} | ### Prompt
Develop a solution in CPP to the problem described below:
You are given a string S of length 3 consisting of `a`, `b` and `c`. Determine if S can be obtained by permuting `abc`.
Constraints
* |S|=3
* S consists of `a`, `b` and `c`.
Input
Input is given from Standard Input in the following format:
S
Output
If S can be obtained by permuting `abc`, print `Yes`; otherwise, print `No`.
Examples
Input
bac
Output
Yes
Input
bab
Output
No
Input
abc
Output
Yes
Input
aaa
Output
No
### Response
```cpp
#import<ios>
#define g getchar()
int main(){printf(g^g^g&3?"No":"Yes");}
``` |
#include <iostream>
using namespace std;
int main()
{
string a;
cin>>a;
if(a[0]!=a[1]&&a[1]!=a[2]&&a[2]!=a[0])cout<<"Yes";
else cout<<"No";
}
| ### Prompt
Your task is to create a CPP solution to the following problem:
You are given a string S of length 3 consisting of `a`, `b` and `c`. Determine if S can be obtained by permuting `abc`.
Constraints
* |S|=3
* S consists of `a`, `b` and `c`.
Input
Input is given from Standard Input in the following format:
S
Output
If S can be obtained by permuting `abc`, print `Yes`; otherwise, print `No`.
Examples
Input
bac
Output
Yes
Input
bab
Output
No
Input
abc
Output
Yes
Input
aaa
Output
No
### Response
```cpp
#include <iostream>
using namespace std;
int main()
{
string a;
cin>>a;
if(a[0]!=a[1]&&a[1]!=a[2]&&a[2]!=a[0])cout<<"Yes";
else cout<<"No";
}
``` |
#include <bits/stdc++.h>
using namespace std;
int main(){
string s;
cin>>s;
sort(s.begin(), s.end());
puts(s=="abc" ? "Yes" : "No");
return 0;
} | ### Prompt
Please provide a CPP coded solution to the problem described below:
You are given a string S of length 3 consisting of `a`, `b` and `c`. Determine if S can be obtained by permuting `abc`.
Constraints
* |S|=3
* S consists of `a`, `b` and `c`.
Input
Input is given from Standard Input in the following format:
S
Output
If S can be obtained by permuting `abc`, print `Yes`; otherwise, print `No`.
Examples
Input
bac
Output
Yes
Input
bab
Output
No
Input
abc
Output
Yes
Input
aaa
Output
No
### Response
```cpp
#include <bits/stdc++.h>
using namespace std;
int main(){
string s;
cin>>s;
sort(s.begin(), s.end());
puts(s=="abc" ? "Yes" : "No");
return 0;
}
``` |
#include<bits/stdc++.h>
using namespace std;
int main() {
string S; cin >> S;
sort(S.begin(), S.end());
cout << ((S == "abc") ? "Yes" : "No") << endl;
return 0;
} | ### Prompt
Generate a CPP solution to the following problem:
You are given a string S of length 3 consisting of `a`, `b` and `c`. Determine if S can be obtained by permuting `abc`.
Constraints
* |S|=3
* S consists of `a`, `b` and `c`.
Input
Input is given from Standard Input in the following format:
S
Output
If S can be obtained by permuting `abc`, print `Yes`; otherwise, print `No`.
Examples
Input
bac
Output
Yes
Input
bab
Output
No
Input
abc
Output
Yes
Input
aaa
Output
No
### Response
```cpp
#include<bits/stdc++.h>
using namespace std;
int main() {
string S; cin >> S;
sort(S.begin(), S.end());
cout << ((S == "abc") ? "Yes" : "No") << endl;
return 0;
}
``` |
#include <bits/stdc++.h>
using namespace std;
int main() {
string S;
cin >> S;
cout << (S[0] != S[1] && S[0] != S[2] && S[1] != S[2] ? "Yes" : "No") << endl;
} | ### Prompt
Create a solution in cpp for the following problem:
You are given a string S of length 3 consisting of `a`, `b` and `c`. Determine if S can be obtained by permuting `abc`.
Constraints
* |S|=3
* S consists of `a`, `b` and `c`.
Input
Input is given from Standard Input in the following format:
S
Output
If S can be obtained by permuting `abc`, print `Yes`; otherwise, print `No`.
Examples
Input
bac
Output
Yes
Input
bab
Output
No
Input
abc
Output
Yes
Input
aaa
Output
No
### Response
```cpp
#include <bits/stdc++.h>
using namespace std;
int main() {
string S;
cin >> S;
cout << (S[0] != S[1] && S[0] != S[2] && S[1] != S[2] ? "Yes" : "No") << endl;
}
``` |
#include<cstdio>
#define N 6
char s[N];
bool f[N];
int main()
{
scanf("%s",s);
for(int i=0;i<3;i++)
f[int(s[i]-97)]=1;
if(f[0]&&f[1]&&f[2]) printf("Yes\n");
else printf("No\n");
} | ### Prompt
Your challenge is to write a CPP solution to the following problem:
You are given a string S of length 3 consisting of `a`, `b` and `c`. Determine if S can be obtained by permuting `abc`.
Constraints
* |S|=3
* S consists of `a`, `b` and `c`.
Input
Input is given from Standard Input in the following format:
S
Output
If S can be obtained by permuting `abc`, print `Yes`; otherwise, print `No`.
Examples
Input
bac
Output
Yes
Input
bab
Output
No
Input
abc
Output
Yes
Input
aaa
Output
No
### Response
```cpp
#include<cstdio>
#define N 6
char s[N];
bool f[N];
int main()
{
scanf("%s",s);
for(int i=0;i<3;i++)
f[int(s[i]-97)]=1;
if(f[0]&&f[1]&&f[2]) printf("Yes\n");
else printf("No\n");
}
``` |
#include <bits/stdc++.h>
using namespace std;
using ll=long long;
int main(){
string s;
cin>>s;
sort(s.begin(),s.end());
if(s=="abc")cout<<"Yes"<<endl;
else cout<<"No"<<endl;
} | ### Prompt
Please provide a CPP coded solution to the problem described below:
You are given a string S of length 3 consisting of `a`, `b` and `c`. Determine if S can be obtained by permuting `abc`.
Constraints
* |S|=3
* S consists of `a`, `b` and `c`.
Input
Input is given from Standard Input in the following format:
S
Output
If S can be obtained by permuting `abc`, print `Yes`; otherwise, print `No`.
Examples
Input
bac
Output
Yes
Input
bab
Output
No
Input
abc
Output
Yes
Input
aaa
Output
No
### Response
```cpp
#include <bits/stdc++.h>
using namespace std;
using ll=long long;
int main(){
string s;
cin>>s;
sort(s.begin(),s.end());
if(s=="abc")cout<<"Yes"<<endl;
else cout<<"No"<<endl;
}
``` |
#include <iostream>
using namespace std;
int main()
{
string s;
cin >> s;
cout << (s=="abc"||s=="acb"||s=="bac"||s=="bca"||s=="cab"||s=="cba" ? "Yes" : "No") << endl;
return 0;
}
| ### Prompt
Your task is to create a cpp solution to the following problem:
You are given a string S of length 3 consisting of `a`, `b` and `c`. Determine if S can be obtained by permuting `abc`.
Constraints
* |S|=3
* S consists of `a`, `b` and `c`.
Input
Input is given from Standard Input in the following format:
S
Output
If S can be obtained by permuting `abc`, print `Yes`; otherwise, print `No`.
Examples
Input
bac
Output
Yes
Input
bab
Output
No
Input
abc
Output
Yes
Input
aaa
Output
No
### Response
```cpp
#include <iostream>
using namespace std;
int main()
{
string s;
cin >> s;
cout << (s=="abc"||s=="acb"||s=="bac"||s=="bca"||s=="cab"||s=="cba" ? "Yes" : "No") << endl;
return 0;
}
``` |
#include <iostream>
int main(){
char s[3];
std::cin>>s;
if(s[0]!=s[1]&&s[0]!=s[2]&&s[1]!=s[2]){
std::cout<<"Yes"<<std::endl;
}
else{
std::cout<<"No"<<std::endl;
}
return 0;
} | ### Prompt
Create a solution in cpp for the following problem:
You are given a string S of length 3 consisting of `a`, `b` and `c`. Determine if S can be obtained by permuting `abc`.
Constraints
* |S|=3
* S consists of `a`, `b` and `c`.
Input
Input is given from Standard Input in the following format:
S
Output
If S can be obtained by permuting `abc`, print `Yes`; otherwise, print `No`.
Examples
Input
bac
Output
Yes
Input
bab
Output
No
Input
abc
Output
Yes
Input
aaa
Output
No
### Response
```cpp
#include <iostream>
int main(){
char s[3];
std::cin>>s;
if(s[0]!=s[1]&&s[0]!=s[2]&&s[1]!=s[2]){
std::cout<<"Yes"<<std::endl;
}
else{
std::cout<<"No"<<std::endl;
}
return 0;
}
``` |
#include<string>
#include<iostream>
using namespace std;
int main(){
string a;
cin>>a;
if(a[0]!=a[1]&&a[2]!=a[1]&&a[0]!=a[2])
cout<<"Yes"<<endl;
else
cout<<"No"<<endl;
return 0;
} | ### Prompt
Please formulate a CPP solution to the following problem:
You are given a string S of length 3 consisting of `a`, `b` and `c`. Determine if S can be obtained by permuting `abc`.
Constraints
* |S|=3
* S consists of `a`, `b` and `c`.
Input
Input is given from Standard Input in the following format:
S
Output
If S can be obtained by permuting `abc`, print `Yes`; otherwise, print `No`.
Examples
Input
bac
Output
Yes
Input
bab
Output
No
Input
abc
Output
Yes
Input
aaa
Output
No
### Response
```cpp
#include<string>
#include<iostream>
using namespace std;
int main(){
string a;
cin>>a;
if(a[0]!=a[1]&&a[2]!=a[1]&&a[0]!=a[2])
cout<<"Yes"<<endl;
else
cout<<"No"<<endl;
return 0;
}
``` |
#include <bits/stdc++.h>
using namespace std;
int main() {
string s; cin >> s;
if(s[0]!=s[1] && s[1]!=s[2] && s[2]!=s[0]) cout << "Yes";
else cout << "No";
} | ### Prompt
Generate a CPP solution to the following problem:
You are given a string S of length 3 consisting of `a`, `b` and `c`. Determine if S can be obtained by permuting `abc`.
Constraints
* |S|=3
* S consists of `a`, `b` and `c`.
Input
Input is given from Standard Input in the following format:
S
Output
If S can be obtained by permuting `abc`, print `Yes`; otherwise, print `No`.
Examples
Input
bac
Output
Yes
Input
bab
Output
No
Input
abc
Output
Yes
Input
aaa
Output
No
### Response
```cpp
#include <bits/stdc++.h>
using namespace std;
int main() {
string s; cin >> s;
if(s[0]!=s[1] && s[1]!=s[2] && s[2]!=s[0]) cout << "Yes";
else cout << "No";
}
``` |
#include<iostream>
using namespace std;
int main(){
string s;
cin>>s;
if(s[0]!=s[1] and s[1]!=s[2] and s[0]!=s[2])cout<<"Yes\n";
else cout<<"No\n";
} | ### Prompt
Please formulate a cpp solution to the following problem:
You are given a string S of length 3 consisting of `a`, `b` and `c`. Determine if S can be obtained by permuting `abc`.
Constraints
* |S|=3
* S consists of `a`, `b` and `c`.
Input
Input is given from Standard Input in the following format:
S
Output
If S can be obtained by permuting `abc`, print `Yes`; otherwise, print `No`.
Examples
Input
bac
Output
Yes
Input
bab
Output
No
Input
abc
Output
Yes
Input
aaa
Output
No
### Response
```cpp
#include<iostream>
using namespace std;
int main(){
string s;
cin>>s;
if(s[0]!=s[1] and s[1]!=s[2] and s[0]!=s[2])cout<<"Yes\n";
else cout<<"No\n";
}
``` |
#include<bits/stdc++.h>
using namespace std;
int main()
{
char s[3];
cin>>s;
if(s[0]!=s[1]&&s[1]!=s[2]&&s[0]!=s[2])
cout<<"Yes"<<endl;
else
cout<<"No"<<endl;
}
| ### Prompt
In Cpp, your task is to solve the following problem:
You are given a string S of length 3 consisting of `a`, `b` and `c`. Determine if S can be obtained by permuting `abc`.
Constraints
* |S|=3
* S consists of `a`, `b` and `c`.
Input
Input is given from Standard Input in the following format:
S
Output
If S can be obtained by permuting `abc`, print `Yes`; otherwise, print `No`.
Examples
Input
bac
Output
Yes
Input
bab
Output
No
Input
abc
Output
Yes
Input
aaa
Output
No
### Response
```cpp
#include<bits/stdc++.h>
using namespace std;
int main()
{
char s[3];
cin>>s;
if(s[0]!=s[1]&&s[1]!=s[2]&&s[0]!=s[2])
cout<<"Yes"<<endl;
else
cout<<"No"<<endl;
}
``` |
#include<iostream>
using namespace std;
int main(){
char a,b,c;
cin>>a>>b>>c;
if(a!=b && b!=c && c!=a) cout<<"Yes"<<endl;
else cout<<"No"<<endl;
return 0;
}
| ### Prompt
Please create a solution in cpp to the following problem:
You are given a string S of length 3 consisting of `a`, `b` and `c`. Determine if S can be obtained by permuting `abc`.
Constraints
* |S|=3
* S consists of `a`, `b` and `c`.
Input
Input is given from Standard Input in the following format:
S
Output
If S can be obtained by permuting `abc`, print `Yes`; otherwise, print `No`.
Examples
Input
bac
Output
Yes
Input
bab
Output
No
Input
abc
Output
Yes
Input
aaa
Output
No
### Response
```cpp
#include<iostream>
using namespace std;
int main(){
char a,b,c;
cin>>a>>b>>c;
if(a!=b && b!=c && c!=a) cout<<"Yes"<<endl;
else cout<<"No"<<endl;
return 0;
}
``` |
#include <bits/stdc++.h>
using namespace std;
int main(){
string S;
cin >> S;
sort(S.begin(),S.end());
printf("%s\n",S=="abc"?"Yes":"No");
}
| ### Prompt
Please formulate a cpp solution to the following problem:
You are given a string S of length 3 consisting of `a`, `b` and `c`. Determine if S can be obtained by permuting `abc`.
Constraints
* |S|=3
* S consists of `a`, `b` and `c`.
Input
Input is given from Standard Input in the following format:
S
Output
If S can be obtained by permuting `abc`, print `Yes`; otherwise, print `No`.
Examples
Input
bac
Output
Yes
Input
bab
Output
No
Input
abc
Output
Yes
Input
aaa
Output
No
### Response
```cpp
#include <bits/stdc++.h>
using namespace std;
int main(){
string S;
cin >> S;
sort(S.begin(),S.end());
printf("%s\n",S=="abc"?"Yes":"No");
}
``` |
#include <bits/stdc++.h>
using namespace std;
int main()
{
string s;
cin>>s;
sort(s.begin(), s.end());
if(s=="abc"){
cout<<"Yes";
}
else{
cout<<"No";
}
return 0;
} | ### Prompt
Generate a cpp solution to the following problem:
You are given a string S of length 3 consisting of `a`, `b` and `c`. Determine if S can be obtained by permuting `abc`.
Constraints
* |S|=3
* S consists of `a`, `b` and `c`.
Input
Input is given from Standard Input in the following format:
S
Output
If S can be obtained by permuting `abc`, print `Yes`; otherwise, print `No`.
Examples
Input
bac
Output
Yes
Input
bab
Output
No
Input
abc
Output
Yes
Input
aaa
Output
No
### Response
```cpp
#include <bits/stdc++.h>
using namespace std;
int main()
{
string s;
cin>>s;
sort(s.begin(), s.end());
if(s=="abc"){
cout<<"Yes";
}
else{
cout<<"No";
}
return 0;
}
``` |
#include <cstdio>
#include <algorithm>
#include <cstring>
int main()
{
char s[4];
scanf("%s", s);
std::sort(s, s + 3);
puts(memcmp(s, "abc", 3) == 0 ? "Yes" : "No");
return 0;
} | ### Prompt
Develop a solution in CPP to the problem described below:
You are given a string S of length 3 consisting of `a`, `b` and `c`. Determine if S can be obtained by permuting `abc`.
Constraints
* |S|=3
* S consists of `a`, `b` and `c`.
Input
Input is given from Standard Input in the following format:
S
Output
If S can be obtained by permuting `abc`, print `Yes`; otherwise, print `No`.
Examples
Input
bac
Output
Yes
Input
bab
Output
No
Input
abc
Output
Yes
Input
aaa
Output
No
### Response
```cpp
#include <cstdio>
#include <algorithm>
#include <cstring>
int main()
{
char s[4];
scanf("%s", s);
std::sort(s, s + 3);
puts(memcmp(s, "abc", 3) == 0 ? "Yes" : "No");
return 0;
}
``` |
#include<bits/stdc++.h>
using namespace std;
int main(){
string s;
cin>>s;
if(s[0]!=s[1] and s[1]!=s[2] and s[2]!=s[0]) cout<<"Yes"<<endl;
else cout<<"No"<<endl;
return 0;
} | ### Prompt
Create a solution in CPP for the following problem:
You are given a string S of length 3 consisting of `a`, `b` and `c`. Determine if S can be obtained by permuting `abc`.
Constraints
* |S|=3
* S consists of `a`, `b` and `c`.
Input
Input is given from Standard Input in the following format:
S
Output
If S can be obtained by permuting `abc`, print `Yes`; otherwise, print `No`.
Examples
Input
bac
Output
Yes
Input
bab
Output
No
Input
abc
Output
Yes
Input
aaa
Output
No
### Response
```cpp
#include<bits/stdc++.h>
using namespace std;
int main(){
string s;
cin>>s;
if(s[0]!=s[1] and s[1]!=s[2] and s[2]!=s[0]) cout<<"Yes"<<endl;
else cout<<"No"<<endl;
return 0;
}
``` |
#include<iostream>
using namespace std;
int main() {
char a[2];
cin >> a;
if (a[0] != a[1] && a[1] != a[2] && a[2] != a[0])cout << "Yes" << endl;
else cout << "No" << endl;
} | ### Prompt
Please create a solution in Cpp to the following problem:
You are given a string S of length 3 consisting of `a`, `b` and `c`. Determine if S can be obtained by permuting `abc`.
Constraints
* |S|=3
* S consists of `a`, `b` and `c`.
Input
Input is given from Standard Input in the following format:
S
Output
If S can be obtained by permuting `abc`, print `Yes`; otherwise, print `No`.
Examples
Input
bac
Output
Yes
Input
bab
Output
No
Input
abc
Output
Yes
Input
aaa
Output
No
### Response
```cpp
#include<iostream>
using namespace std;
int main() {
char a[2];
cin >> a;
if (a[0] != a[1] && a[1] != a[2] && a[2] != a[0])cout << "Yes" << endl;
else cout << "No" << endl;
}
``` |
#include <bits/stdc++.h>
using namespace std;
int main() {
string S;
cin >> S;
sort(S.begin(), S.end());
cout << ((S == "abc") ? "Yes" : "No") << "\n";
} | ### Prompt
Please create a solution in CPP to the following problem:
You are given a string S of length 3 consisting of `a`, `b` and `c`. Determine if S can be obtained by permuting `abc`.
Constraints
* |S|=3
* S consists of `a`, `b` and `c`.
Input
Input is given from Standard Input in the following format:
S
Output
If S can be obtained by permuting `abc`, print `Yes`; otherwise, print `No`.
Examples
Input
bac
Output
Yes
Input
bab
Output
No
Input
abc
Output
Yes
Input
aaa
Output
No
### Response
```cpp
#include <bits/stdc++.h>
using namespace std;
int main() {
string S;
cin >> S;
sort(S.begin(), S.end());
cout << ((S == "abc") ? "Yes" : "No") << "\n";
}
``` |
#include <iostream>
using namespace std;
int main() {
string s;
cin>>s;
if(s[0]!=s[1]&&s[1]!=s[2]&&s[2]!=s[0]){
cout<<"Yes"<<endl;
}
else{
cout<<"No"<<endl;
}
return 0;
} | ### Prompt
Your challenge is to write a Cpp solution to the following problem:
You are given a string S of length 3 consisting of `a`, `b` and `c`. Determine if S can be obtained by permuting `abc`.
Constraints
* |S|=3
* S consists of `a`, `b` and `c`.
Input
Input is given from Standard Input in the following format:
S
Output
If S can be obtained by permuting `abc`, print `Yes`; otherwise, print `No`.
Examples
Input
bac
Output
Yes
Input
bab
Output
No
Input
abc
Output
Yes
Input
aaa
Output
No
### Response
```cpp
#include <iostream>
using namespace std;
int main() {
string s;
cin>>s;
if(s[0]!=s[1]&&s[1]!=s[2]&&s[2]!=s[0]){
cout<<"Yes"<<endl;
}
else{
cout<<"No"<<endl;
}
return 0;
}
``` |
#include<bits/stdc++.h>
using namespace std;
int main ()
{
string s; cin>>s;
if(s[0]!=s[1]&&s[1]!=s[2]&&s[2]!=s[0]){
cout<<"Yes"<<endl;
}
else
cout<<"No"<<endl;
}
| ### Prompt
Construct a Cpp code solution to the problem outlined:
You are given a string S of length 3 consisting of `a`, `b` and `c`. Determine if S can be obtained by permuting `abc`.
Constraints
* |S|=3
* S consists of `a`, `b` and `c`.
Input
Input is given from Standard Input in the following format:
S
Output
If S can be obtained by permuting `abc`, print `Yes`; otherwise, print `No`.
Examples
Input
bac
Output
Yes
Input
bab
Output
No
Input
abc
Output
Yes
Input
aaa
Output
No
### Response
```cpp
#include<bits/stdc++.h>
using namespace std;
int main ()
{
string s; cin>>s;
if(s[0]!=s[1]&&s[1]!=s[2]&&s[2]!=s[0]){
cout<<"Yes"<<endl;
}
else
cout<<"No"<<endl;
}
``` |
#include <bits/stdc++.h>
using namespace std;
int main(){
string S;
cin >> S;
sort(S.begin(), S.end());
cout << (S=="abc"?"Yes":"No") << endl;
return 0;
} | ### Prompt
In cpp, your task is to solve the following problem:
You are given a string S of length 3 consisting of `a`, `b` and `c`. Determine if S can be obtained by permuting `abc`.
Constraints
* |S|=3
* S consists of `a`, `b` and `c`.
Input
Input is given from Standard Input in the following format:
S
Output
If S can be obtained by permuting `abc`, print `Yes`; otherwise, print `No`.
Examples
Input
bac
Output
Yes
Input
bab
Output
No
Input
abc
Output
Yes
Input
aaa
Output
No
### Response
```cpp
#include <bits/stdc++.h>
using namespace std;
int main(){
string S;
cin >> S;
sort(S.begin(), S.end());
cout << (S=="abc"?"Yes":"No") << endl;
return 0;
}
``` |
#include <bits/stdc++.h>
using namespace std;
int main()
{
string s; cin>>s;
set<char> res(begin(s), end(s));
cout<<(res.size()==3 ? "Yes" : "No")<<endl;
}
| ### Prompt
Develop a solution in cpp to the problem described below:
You are given a string S of length 3 consisting of `a`, `b` and `c`. Determine if S can be obtained by permuting `abc`.
Constraints
* |S|=3
* S consists of `a`, `b` and `c`.
Input
Input is given from Standard Input in the following format:
S
Output
If S can be obtained by permuting `abc`, print `Yes`; otherwise, print `No`.
Examples
Input
bac
Output
Yes
Input
bab
Output
No
Input
abc
Output
Yes
Input
aaa
Output
No
### Response
```cpp
#include <bits/stdc++.h>
using namespace std;
int main()
{
string s; cin>>s;
set<char> res(begin(s), end(s));
cout<<(res.size()==3 ? "Yes" : "No")<<endl;
}
``` |
#include <bits/stdc++.h>
using namespace std;
int main(){string s;cin>>s;cout<<(s[0]+s[1]+s[2]==294?"Yes":"No");} | ### Prompt
In CPP, your task is to solve the following problem:
You are given a string S of length 3 consisting of `a`, `b` and `c`. Determine if S can be obtained by permuting `abc`.
Constraints
* |S|=3
* S consists of `a`, `b` and `c`.
Input
Input is given from Standard Input in the following format:
S
Output
If S can be obtained by permuting `abc`, print `Yes`; otherwise, print `No`.
Examples
Input
bac
Output
Yes
Input
bab
Output
No
Input
abc
Output
Yes
Input
aaa
Output
No
### Response
```cpp
#include <bits/stdc++.h>
using namespace std;
int main(){string s;cin>>s;cout<<(s[0]+s[1]+s[2]==294?"Yes":"No");}
``` |
#include <iostream>
using namespace std;
int main() {
string s;
cin >> s;
cout << ((s[0] != s[1] && s[1] != s[2] && s[2] != s[0])? "Yes" : "No") << endl;
return 0;
} | ### Prompt
In CPP, your task is to solve the following problem:
You are given a string S of length 3 consisting of `a`, `b` and `c`. Determine if S can be obtained by permuting `abc`.
Constraints
* |S|=3
* S consists of `a`, `b` and `c`.
Input
Input is given from Standard Input in the following format:
S
Output
If S can be obtained by permuting `abc`, print `Yes`; otherwise, print `No`.
Examples
Input
bac
Output
Yes
Input
bab
Output
No
Input
abc
Output
Yes
Input
aaa
Output
No
### Response
```cpp
#include <iostream>
using namespace std;
int main() {
string s;
cin >> s;
cout << ((s[0] != s[1] && s[1] != s[2] && s[2] != s[0])? "Yes" : "No") << endl;
return 0;
}
``` |
#include "bits/stdc++.h"
using namespace std;
int main() {
string s;
cin >> s;
if (s[0]!=s[1] && s[1]!= s[2] && s[2]!=s[0]) cout << "Yes\n";
else cout << "No\n";
} | ### Prompt
Generate a Cpp solution to the following problem:
You are given a string S of length 3 consisting of `a`, `b` and `c`. Determine if S can be obtained by permuting `abc`.
Constraints
* |S|=3
* S consists of `a`, `b` and `c`.
Input
Input is given from Standard Input in the following format:
S
Output
If S can be obtained by permuting `abc`, print `Yes`; otherwise, print `No`.
Examples
Input
bac
Output
Yes
Input
bab
Output
No
Input
abc
Output
Yes
Input
aaa
Output
No
### Response
```cpp
#include "bits/stdc++.h"
using namespace std;
int main() {
string s;
cin >> s;
if (s[0]!=s[1] && s[1]!= s[2] && s[2]!=s[0]) cout << "Yes\n";
else cout << "No\n";
}
``` |
#include<stdio.h>
char a[3];
int main(){
scanf("%s",&a);
if((int)('a'+'b'+'c')==(int)(a[0]+a[1]+a[2]))printf("Yes");
else printf("No");
return 0;
} | ### Prompt
Please provide a cpp coded solution to the problem described below:
You are given a string S of length 3 consisting of `a`, `b` and `c`. Determine if S can be obtained by permuting `abc`.
Constraints
* |S|=3
* S consists of `a`, `b` and `c`.
Input
Input is given from Standard Input in the following format:
S
Output
If S can be obtained by permuting `abc`, print `Yes`; otherwise, print `No`.
Examples
Input
bac
Output
Yes
Input
bab
Output
No
Input
abc
Output
Yes
Input
aaa
Output
No
### Response
```cpp
#include<stdio.h>
char a[3];
int main(){
scanf("%s",&a);
if((int)('a'+'b'+'c')==(int)(a[0]+a[1]+a[2]))printf("Yes");
else printf("No");
return 0;
}
``` |
#include <bits/stdc++.h>
using namespace std;
int main(){
string S; cin>>S;
if(S[0]!=S[1] && S[1]!=S[2] && S[2]!=S[0]) cout<<"Yes"<<endl;
else cout<<"No"<<endl;
return 0;
} | ### Prompt
Please provide a Cpp coded solution to the problem described below:
You are given a string S of length 3 consisting of `a`, `b` and `c`. Determine if S can be obtained by permuting `abc`.
Constraints
* |S|=3
* S consists of `a`, `b` and `c`.
Input
Input is given from Standard Input in the following format:
S
Output
If S can be obtained by permuting `abc`, print `Yes`; otherwise, print `No`.
Examples
Input
bac
Output
Yes
Input
bab
Output
No
Input
abc
Output
Yes
Input
aaa
Output
No
### Response
```cpp
#include <bits/stdc++.h>
using namespace std;
int main(){
string S; cin>>S;
if(S[0]!=S[1] && S[1]!=S[2] && S[2]!=S[0]) cout<<"Yes"<<endl;
else cout<<"No"<<endl;
return 0;
}
``` |
#include<bits/stdc++.h>
using namespace std;
int main() {
string a;
cin >> a;
sort(a.begin(), a.end());
cout << (a == "abc" ? "Yes\n" : "No\n");
return 0;
}
| ### Prompt
In CPP, your task is to solve the following problem:
You are given a string S of length 3 consisting of `a`, `b` and `c`. Determine if S can be obtained by permuting `abc`.
Constraints
* |S|=3
* S consists of `a`, `b` and `c`.
Input
Input is given from Standard Input in the following format:
S
Output
If S can be obtained by permuting `abc`, print `Yes`; otherwise, print `No`.
Examples
Input
bac
Output
Yes
Input
bab
Output
No
Input
abc
Output
Yes
Input
aaa
Output
No
### Response
```cpp
#include<bits/stdc++.h>
using namespace std;
int main() {
string a;
cin >> a;
sort(a.begin(), a.end());
cout << (a == "abc" ? "Yes\n" : "No\n");
return 0;
}
``` |
#include<iostream>
int main(){char a,b,c;std::cin>>a>>b>>c;std::cout<<((a==b||b==c||c==a)?"No":"Yes");} | ### Prompt
Please provide a CPP coded solution to the problem described below:
You are given a string S of length 3 consisting of `a`, `b` and `c`. Determine if S can be obtained by permuting `abc`.
Constraints
* |S|=3
* S consists of `a`, `b` and `c`.
Input
Input is given from Standard Input in the following format:
S
Output
If S can be obtained by permuting `abc`, print `Yes`; otherwise, print `No`.
Examples
Input
bac
Output
Yes
Input
bab
Output
No
Input
abc
Output
Yes
Input
aaa
Output
No
### Response
```cpp
#include<iostream>
int main(){char a,b,c;std::cin>>a>>b>>c;std::cout<<((a==b||b==c||c==a)?"No":"Yes");}
``` |
#include <bits/stdc++.h>
using namespace std;
string s;
int main(){
cin >> s;
sort(s.begin(), s.end());
cout << (s == "abc" ? "Yes\n" : "No\n");
} | ### Prompt
Please create a solution in Cpp to the following problem:
You are given a string S of length 3 consisting of `a`, `b` and `c`. Determine if S can be obtained by permuting `abc`.
Constraints
* |S|=3
* S consists of `a`, `b` and `c`.
Input
Input is given from Standard Input in the following format:
S
Output
If S can be obtained by permuting `abc`, print `Yes`; otherwise, print `No`.
Examples
Input
bac
Output
Yes
Input
bab
Output
No
Input
abc
Output
Yes
Input
aaa
Output
No
### Response
```cpp
#include <bits/stdc++.h>
using namespace std;
string s;
int main(){
cin >> s;
sort(s.begin(), s.end());
cout << (s == "abc" ? "Yes\n" : "No\n");
}
``` |
#include<bits/stdc++.h>
using namespace std;
int main(){
string S;
cin>>S;
if(S[0]!=S[1]&&S[1]!=S[2]&&S[0]!=S[2])cout<<"Yes"<<endl;
else cout<<"No"<<endl;
} | ### Prompt
Please create a solution in Cpp to the following problem:
You are given a string S of length 3 consisting of `a`, `b` and `c`. Determine if S can be obtained by permuting `abc`.
Constraints
* |S|=3
* S consists of `a`, `b` and `c`.
Input
Input is given from Standard Input in the following format:
S
Output
If S can be obtained by permuting `abc`, print `Yes`; otherwise, print `No`.
Examples
Input
bac
Output
Yes
Input
bab
Output
No
Input
abc
Output
Yes
Input
aaa
Output
No
### Response
```cpp
#include<bits/stdc++.h>
using namespace std;
int main(){
string S;
cin>>S;
if(S[0]!=S[1]&&S[1]!=S[2]&&S[0]!=S[2])cout<<"Yes"<<endl;
else cout<<"No"<<endl;
}
``` |
#include<bits/stdc++.h>
using namespace std;
int main(){
string s;
cin >> s;
if(s[0]!=s[1] && s[1]!=s[2] && s[2]!=s[0]) cout << "Yes";
else cout << "No";
return 0;
} | ### Prompt
In cpp, your task is to solve the following problem:
You are given a string S of length 3 consisting of `a`, `b` and `c`. Determine if S can be obtained by permuting `abc`.
Constraints
* |S|=3
* S consists of `a`, `b` and `c`.
Input
Input is given from Standard Input in the following format:
S
Output
If S can be obtained by permuting `abc`, print `Yes`; otherwise, print `No`.
Examples
Input
bac
Output
Yes
Input
bab
Output
No
Input
abc
Output
Yes
Input
aaa
Output
No
### Response
```cpp
#include<bits/stdc++.h>
using namespace std;
int main(){
string s;
cin >> s;
if(s[0]!=s[1] && s[1]!=s[2] && s[2]!=s[0]) cout << "Yes";
else cout << "No";
return 0;
}
``` |
#include<bits/stdc++.h>
using namespace std;
string s;
int main()
{
cin>>s;
sort(s.begin(),s.end());
if(s=="abc")
cout<<"Yes";
else
cout<<"No";
return 0;
} | ### Prompt
Generate a CPP solution to the following problem:
You are given a string S of length 3 consisting of `a`, `b` and `c`. Determine if S can be obtained by permuting `abc`.
Constraints
* |S|=3
* S consists of `a`, `b` and `c`.
Input
Input is given from Standard Input in the following format:
S
Output
If S can be obtained by permuting `abc`, print `Yes`; otherwise, print `No`.
Examples
Input
bac
Output
Yes
Input
bab
Output
No
Input
abc
Output
Yes
Input
aaa
Output
No
### Response
```cpp
#include<bits/stdc++.h>
using namespace std;
string s;
int main()
{
cin>>s;
sort(s.begin(),s.end());
if(s=="abc")
cout<<"Yes";
else
cout<<"No";
return 0;
}
``` |
#include<cstdio>
int main(){
char s[5];
scanf("%s",s+1);
if(s[1]!=s[2]&&s[2]!=s[3]&&s[1]!=s[3])
puts("Yes");
else
puts("No");
}
| ### Prompt
Develop a solution in CPP to the problem described below:
You are given a string S of length 3 consisting of `a`, `b` and `c`. Determine if S can be obtained by permuting `abc`.
Constraints
* |S|=3
* S consists of `a`, `b` and `c`.
Input
Input is given from Standard Input in the following format:
S
Output
If S can be obtained by permuting `abc`, print `Yes`; otherwise, print `No`.
Examples
Input
bac
Output
Yes
Input
bab
Output
No
Input
abc
Output
Yes
Input
aaa
Output
No
### Response
```cpp
#include<cstdio>
int main(){
char s[5];
scanf("%s",s+1);
if(s[1]!=s[2]&&s[2]!=s[3]&&s[1]!=s[3])
puts("Yes");
else
puts("No");
}
``` |
#include<bits/stdc++.h>
using namespace std;
int main(){
char s[10]; cin >> s;
if(s[0] != s[1] && s[1] != s[2] && s[2] != s[0]) puts("Yes");
else puts("No");
}
| ### Prompt
Please formulate a CPP solution to the following problem:
You are given a string S of length 3 consisting of `a`, `b` and `c`. Determine if S can be obtained by permuting `abc`.
Constraints
* |S|=3
* S consists of `a`, `b` and `c`.
Input
Input is given from Standard Input in the following format:
S
Output
If S can be obtained by permuting `abc`, print `Yes`; otherwise, print `No`.
Examples
Input
bac
Output
Yes
Input
bab
Output
No
Input
abc
Output
Yes
Input
aaa
Output
No
### Response
```cpp
#include<bits/stdc++.h>
using namespace std;
int main(){
char s[10]; cin >> s;
if(s[0] != s[1] && s[1] != s[2] && s[2] != s[0]) puts("Yes");
else puts("No");
}
``` |
#import<iostream>
int main(){char a,b,c;std::cin>>a>>b>>c;std::cout<<(a!=b&&a!=c&&b!=c?"Yes":"No");} | ### Prompt
Construct a Cpp code solution to the problem outlined:
You are given a string S of length 3 consisting of `a`, `b` and `c`. Determine if S can be obtained by permuting `abc`.
Constraints
* |S|=3
* S consists of `a`, `b` and `c`.
Input
Input is given from Standard Input in the following format:
S
Output
If S can be obtained by permuting `abc`, print `Yes`; otherwise, print `No`.
Examples
Input
bac
Output
Yes
Input
bab
Output
No
Input
abc
Output
Yes
Input
aaa
Output
No
### Response
```cpp
#import<iostream>
int main(){char a,b,c;std::cin>>a>>b>>c;std::cout<<(a!=b&&a!=c&&b!=c?"Yes":"No");}
``` |
#include <iostream>
int main(){char a,b,c;std::cin>>a>>b>>c;puts((a+b+c==294)?"Yes":"No");} | ### Prompt
Generate a CPP solution to the following problem:
You are given a string S of length 3 consisting of `a`, `b` and `c`. Determine if S can be obtained by permuting `abc`.
Constraints
* |S|=3
* S consists of `a`, `b` and `c`.
Input
Input is given from Standard Input in the following format:
S
Output
If S can be obtained by permuting `abc`, print `Yes`; otherwise, print `No`.
Examples
Input
bac
Output
Yes
Input
bab
Output
No
Input
abc
Output
Yes
Input
aaa
Output
No
### Response
```cpp
#include <iostream>
int main(){char a,b,c;std::cin>>a>>b>>c;puts((a+b+c==294)?"Yes":"No");}
``` |
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
int main() {
string S;
cin >> S;
sort(S.begin(), S.end());
cout << (S == "abc" ? "Yes" : "No") << endl;
} | ### Prompt
Please create a solution in CPP to the following problem:
You are given a string S of length 3 consisting of `a`, `b` and `c`. Determine if S can be obtained by permuting `abc`.
Constraints
* |S|=3
* S consists of `a`, `b` and `c`.
Input
Input is given from Standard Input in the following format:
S
Output
If S can be obtained by permuting `abc`, print `Yes`; otherwise, print `No`.
Examples
Input
bac
Output
Yes
Input
bab
Output
No
Input
abc
Output
Yes
Input
aaa
Output
No
### Response
```cpp
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
int main() {
string S;
cin >> S;
sort(S.begin(), S.end());
cout << (S == "abc" ? "Yes" : "No") << endl;
}
``` |
#include<iostream>
using namespace std ;
int main(){
char a,b,c ;
cin >> a >> b >> c ;
if(a!=b&&b!=c&&c!=a) cout << "Yes" << endl;
else cout << "No" << endl ;
} | ### Prompt
Please create a solution in Cpp to the following problem:
You are given a string S of length 3 consisting of `a`, `b` and `c`. Determine if S can be obtained by permuting `abc`.
Constraints
* |S|=3
* S consists of `a`, `b` and `c`.
Input
Input is given from Standard Input in the following format:
S
Output
If S can be obtained by permuting `abc`, print `Yes`; otherwise, print `No`.
Examples
Input
bac
Output
Yes
Input
bab
Output
No
Input
abc
Output
Yes
Input
aaa
Output
No
### Response
```cpp
#include<iostream>
using namespace std ;
int main(){
char a,b,c ;
cin >> a >> b >> c ;
if(a!=b&&b!=c&&c!=a) cout << "Yes" << endl;
else cout << "No" << endl ;
}
``` |
#include <iostream>
#include <algorithm>
using namespace std;
int main(){
string s;cin>>s;
sort(s.begin(),s.end());
if(s == "abc")cout << "Yes" << endl;
else cout << "No" << endl;
} | ### Prompt
Develop a solution in CPP to the problem described below:
You are given a string S of length 3 consisting of `a`, `b` and `c`. Determine if S can be obtained by permuting `abc`.
Constraints
* |S|=3
* S consists of `a`, `b` and `c`.
Input
Input is given from Standard Input in the following format:
S
Output
If S can be obtained by permuting `abc`, print `Yes`; otherwise, print `No`.
Examples
Input
bac
Output
Yes
Input
bab
Output
No
Input
abc
Output
Yes
Input
aaa
Output
No
### Response
```cpp
#include <iostream>
#include <algorithm>
using namespace std;
int main(){
string s;cin>>s;
sort(s.begin(),s.end());
if(s == "abc")cout << "Yes" << endl;
else cout << "No" << endl;
}
``` |
#include <bits/stdc++.h>
using namespace std;
int main(){
string s;
cin>>s;
if(s[0]!=s[1]&&s[1]!=s[2]&&s[2]!=s[0]) cout<<"Yes"<<endl;
else cout<<"No"<<endl;
}
| ### Prompt
Please provide a cpp coded solution to the problem described below:
You are given a string S of length 3 consisting of `a`, `b` and `c`. Determine if S can be obtained by permuting `abc`.
Constraints
* |S|=3
* S consists of `a`, `b` and `c`.
Input
Input is given from Standard Input in the following format:
S
Output
If S can be obtained by permuting `abc`, print `Yes`; otherwise, print `No`.
Examples
Input
bac
Output
Yes
Input
bab
Output
No
Input
abc
Output
Yes
Input
aaa
Output
No
### Response
```cpp
#include <bits/stdc++.h>
using namespace std;
int main(){
string s;
cin>>s;
if(s[0]!=s[1]&&s[1]!=s[2]&&s[2]!=s[0]) cout<<"Yes"<<endl;
else cout<<"No"<<endl;
}
``` |
#include <bits/stdc++.h>
using namespace std;
int main() {
string S;
cin >> S;
sort(S.begin(), S.end());
cout << ((S=="abc") ? "Yes" : "No") << endl;
} | ### Prompt
In cpp, your task is to solve the following problem:
You are given a string S of length 3 consisting of `a`, `b` and `c`. Determine if S can be obtained by permuting `abc`.
Constraints
* |S|=3
* S consists of `a`, `b` and `c`.
Input
Input is given from Standard Input in the following format:
S
Output
If S can be obtained by permuting `abc`, print `Yes`; otherwise, print `No`.
Examples
Input
bac
Output
Yes
Input
bab
Output
No
Input
abc
Output
Yes
Input
aaa
Output
No
### Response
```cpp
#include <bits/stdc++.h>
using namespace std;
int main() {
string S;
cin >> S;
sort(S.begin(), S.end());
cout << ((S=="abc") ? "Yes" : "No") << endl;
}
``` |
#include<cstdio>
int main(){
char s[5];
scanf("%s",s+1);
if(s[1]!=s[2]&&s[2]!=s[3]&&s[1]!=s[3])
puts("Yes");
else
puts("No");
}
/**/ | ### Prompt
Your challenge is to write a CPP solution to the following problem:
You are given a string S of length 3 consisting of `a`, `b` and `c`. Determine if S can be obtained by permuting `abc`.
Constraints
* |S|=3
* S consists of `a`, `b` and `c`.
Input
Input is given from Standard Input in the following format:
S
Output
If S can be obtained by permuting `abc`, print `Yes`; otherwise, print `No`.
Examples
Input
bac
Output
Yes
Input
bab
Output
No
Input
abc
Output
Yes
Input
aaa
Output
No
### Response
```cpp
#include<cstdio>
int main(){
char s[5];
scanf("%s",s+1);
if(s[1]!=s[2]&&s[2]!=s[3]&&s[1]!=s[3])
puts("Yes");
else
puts("No");
}
/**/
``` |
#include<iostream>
int main(){char a,b,c;std::cin>>a>>b>>c;std::cout<<((a==b || b==c || c==a)?"No":"Yes");} | ### Prompt
Generate a Cpp solution to the following problem:
You are given a string S of length 3 consisting of `a`, `b` and `c`. Determine if S can be obtained by permuting `abc`.
Constraints
* |S|=3
* S consists of `a`, `b` and `c`.
Input
Input is given from Standard Input in the following format:
S
Output
If S can be obtained by permuting `abc`, print `Yes`; otherwise, print `No`.
Examples
Input
bac
Output
Yes
Input
bab
Output
No
Input
abc
Output
Yes
Input
aaa
Output
No
### Response
```cpp
#include<iostream>
int main(){char a,b,c;std::cin>>a>>b>>c;std::cout<<((a==b || b==c || c==a)?"No":"Yes");}
``` |
#include <bits/stdc++.h>
using namespace std;
int main(){
char a,b,c;
cin >> a >> b >> c;
if(a==b||a==c||b==c)
cout << "No" << endl;
else
cout << "Yes" << endl;
} | ### Prompt
Please create a solution in Cpp to the following problem:
You are given a string S of length 3 consisting of `a`, `b` and `c`. Determine if S can be obtained by permuting `abc`.
Constraints
* |S|=3
* S consists of `a`, `b` and `c`.
Input
Input is given from Standard Input in the following format:
S
Output
If S can be obtained by permuting `abc`, print `Yes`; otherwise, print `No`.
Examples
Input
bac
Output
Yes
Input
bab
Output
No
Input
abc
Output
Yes
Input
aaa
Output
No
### Response
```cpp
#include <bits/stdc++.h>
using namespace std;
int main(){
char a,b,c;
cin >> a >> b >> c;
if(a==b||a==c||b==c)
cout << "No" << endl;
else
cout << "Yes" << endl;
}
``` |
#include <bits/stdc++.h>
using namespace std;
int main() {
string s ;
cin >> s ;
sort(s.begin(),s.end());
if(s == "abc")
cout << "Yes" ;
else
cout << "No" ;
}
| ### Prompt
Please create a solution in Cpp to the following problem:
You are given a string S of length 3 consisting of `a`, `b` and `c`. Determine if S can be obtained by permuting `abc`.
Constraints
* |S|=3
* S consists of `a`, `b` and `c`.
Input
Input is given from Standard Input in the following format:
S
Output
If S can be obtained by permuting `abc`, print `Yes`; otherwise, print `No`.
Examples
Input
bac
Output
Yes
Input
bab
Output
No
Input
abc
Output
Yes
Input
aaa
Output
No
### Response
```cpp
#include <bits/stdc++.h>
using namespace std;
int main() {
string s ;
cin >> s ;
sort(s.begin(),s.end());
if(s == "abc")
cout << "Yes" ;
else
cout << "No" ;
}
``` |
#include "bits/stdc++.h"
using namespace std;
int main(){
string s;
cin>>s;
sort(s.begin(),s.end());
if(s=="abc"){
cout<<"Yes"<<endl;
}else{
cout<<"No"<<endl;
}
} | ### Prompt
Please formulate a CPP solution to the following problem:
You are given a string S of length 3 consisting of `a`, `b` and `c`. Determine if S can be obtained by permuting `abc`.
Constraints
* |S|=3
* S consists of `a`, `b` and `c`.
Input
Input is given from Standard Input in the following format:
S
Output
If S can be obtained by permuting `abc`, print `Yes`; otherwise, print `No`.
Examples
Input
bac
Output
Yes
Input
bab
Output
No
Input
abc
Output
Yes
Input
aaa
Output
No
### Response
```cpp
#include "bits/stdc++.h"
using namespace std;
int main(){
string s;
cin>>s;
sort(s.begin(),s.end());
if(s=="abc"){
cout<<"Yes"<<endl;
}else{
cout<<"No"<<endl;
}
}
``` |
#include <bits/stdc++.h>
using namespace std;
int main() {
string X;
cin>>X;
sort(X.begin(),X.end());
if(X=="abc"){
cout<<"Yes"<<endl;
}
else{
cout<<"No"<<endl;
}
} | ### Prompt
Create a solution in cpp for the following problem:
You are given a string S of length 3 consisting of `a`, `b` and `c`. Determine if S can be obtained by permuting `abc`.
Constraints
* |S|=3
* S consists of `a`, `b` and `c`.
Input
Input is given from Standard Input in the following format:
S
Output
If S can be obtained by permuting `abc`, print `Yes`; otherwise, print `No`.
Examples
Input
bac
Output
Yes
Input
bab
Output
No
Input
abc
Output
Yes
Input
aaa
Output
No
### Response
```cpp
#include <bits/stdc++.h>
using namespace std;
int main() {
string X;
cin>>X;
sort(X.begin(),X.end());
if(X=="abc"){
cout<<"Yes"<<endl;
}
else{
cout<<"No"<<endl;
}
}
``` |
#include<bits/stdc++.h>
using namespace std;
int main(){
string s;cin>>s;
cout<<(s[0]==s[1]||s[1]==s[2]||s[2]==s[0]?"No":"Yes");
} | ### Prompt
Your challenge is to write a Cpp solution to the following problem:
You are given a string S of length 3 consisting of `a`, `b` and `c`. Determine if S can be obtained by permuting `abc`.
Constraints
* |S|=3
* S consists of `a`, `b` and `c`.
Input
Input is given from Standard Input in the following format:
S
Output
If S can be obtained by permuting `abc`, print `Yes`; otherwise, print `No`.
Examples
Input
bac
Output
Yes
Input
bab
Output
No
Input
abc
Output
Yes
Input
aaa
Output
No
### Response
```cpp
#include<bits/stdc++.h>
using namespace std;
int main(){
string s;cin>>s;
cout<<(s[0]==s[1]||s[1]==s[2]||s[2]==s[0]?"No":"Yes");
}
``` |
#include <iostream>
using namespace std;
int main(){
string s;cin>>s;
cout<<((s[0]+s[1]+s[2]==294)?"Yes":"No")<<endl;
} | ### Prompt
Please create a solution in Cpp to the following problem:
You are given a string S of length 3 consisting of `a`, `b` and `c`. Determine if S can be obtained by permuting `abc`.
Constraints
* |S|=3
* S consists of `a`, `b` and `c`.
Input
Input is given from Standard Input in the following format:
S
Output
If S can be obtained by permuting `abc`, print `Yes`; otherwise, print `No`.
Examples
Input
bac
Output
Yes
Input
bab
Output
No
Input
abc
Output
Yes
Input
aaa
Output
No
### Response
```cpp
#include <iostream>
using namespace std;
int main(){
string s;cin>>s;
cout<<((s[0]+s[1]+s[2]==294)?"Yes":"No")<<endl;
}
``` |
#include <bits/stdc++.h>
using namespace std;
int main() {
string s;
cin>>s;
if(s=="abc"||s=="acb"||s=="bac"||s=="bca"||s=="cab"||s=="cba")
cout<<"Yes";
else
cout<<"No";
}
| ### Prompt
Create a solution in CPP for the following problem:
You are given a string S of length 3 consisting of `a`, `b` and `c`. Determine if S can be obtained by permuting `abc`.
Constraints
* |S|=3
* S consists of `a`, `b` and `c`.
Input
Input is given from Standard Input in the following format:
S
Output
If S can be obtained by permuting `abc`, print `Yes`; otherwise, print `No`.
Examples
Input
bac
Output
Yes
Input
bab
Output
No
Input
abc
Output
Yes
Input
aaa
Output
No
### Response
```cpp
#include <bits/stdc++.h>
using namespace std;
int main() {
string s;
cin>>s;
if(s=="abc"||s=="acb"||s=="bac"||s=="bca"||s=="cab"||s=="cba")
cout<<"Yes";
else
cout<<"No";
}
``` |
#import<ios>
int main(){printf(getchar()^getchar()^getchar()^96?"No":"Yes");} | ### Prompt
Your challenge is to write a Cpp solution to the following problem:
You are given a string S of length 3 consisting of `a`, `b` and `c`. Determine if S can be obtained by permuting `abc`.
Constraints
* |S|=3
* S consists of `a`, `b` and `c`.
Input
Input is given from Standard Input in the following format:
S
Output
If S can be obtained by permuting `abc`, print `Yes`; otherwise, print `No`.
Examples
Input
bac
Output
Yes
Input
bab
Output
No
Input
abc
Output
Yes
Input
aaa
Output
No
### Response
```cpp
#import<ios>
int main(){printf(getchar()^getchar()^getchar()^96?"No":"Yes");}
``` |
#include <bits/stdc++.h>
using namespace std;
int main () {
string s;
cin >> s;
sort(s.begin(), s.end());
if (s == "abc") puts("Yes");
else puts("No");
} | ### Prompt
Please create a solution in Cpp to the following problem:
You are given a string S of length 3 consisting of `a`, `b` and `c`. Determine if S can be obtained by permuting `abc`.
Constraints
* |S|=3
* S consists of `a`, `b` and `c`.
Input
Input is given from Standard Input in the following format:
S
Output
If S can be obtained by permuting `abc`, print `Yes`; otherwise, print `No`.
Examples
Input
bac
Output
Yes
Input
bab
Output
No
Input
abc
Output
Yes
Input
aaa
Output
No
### Response
```cpp
#include <bits/stdc++.h>
using namespace std;
int main () {
string s;
cin >> s;
sort(s.begin(), s.end());
if (s == "abc") puts("Yes");
else puts("No");
}
``` |
#include <bits/stdc++.h>
using namespace std;
int main(){
string s;
cin>>s;
sort(s.begin(), s.end());
cout<<(s=="abc"?"Yes":"No");
} | ### Prompt
Construct a Cpp code solution to the problem outlined:
You are given a string S of length 3 consisting of `a`, `b` and `c`. Determine if S can be obtained by permuting `abc`.
Constraints
* |S|=3
* S consists of `a`, `b` and `c`.
Input
Input is given from Standard Input in the following format:
S
Output
If S can be obtained by permuting `abc`, print `Yes`; otherwise, print `No`.
Examples
Input
bac
Output
Yes
Input
bab
Output
No
Input
abc
Output
Yes
Input
aaa
Output
No
### Response
```cpp
#include <bits/stdc++.h>
using namespace std;
int main(){
string s;
cin>>s;
sort(s.begin(), s.end());
cout<<(s=="abc"?"Yes":"No");
}
``` |
#include<iostream>
#include<algorithm>
using namespace std;
int main() {
string a;
cin >> a;
sort(a.begin(), a.end());
cout << ((a == "abc")? "Yes" : "No");
}
| ### Prompt
Your task is to create a Cpp solution to the following problem:
You are given a string S of length 3 consisting of `a`, `b` and `c`. Determine if S can be obtained by permuting `abc`.
Constraints
* |S|=3
* S consists of `a`, `b` and `c`.
Input
Input is given from Standard Input in the following format:
S
Output
If S can be obtained by permuting `abc`, print `Yes`; otherwise, print `No`.
Examples
Input
bac
Output
Yes
Input
bab
Output
No
Input
abc
Output
Yes
Input
aaa
Output
No
### Response
```cpp
#include<iostream>
#include<algorithm>
using namespace std;
int main() {
string a;
cin >> a;
sort(a.begin(), a.end());
cout << ((a == "abc")? "Yes" : "No");
}
``` |
#include <bits/stdc++.h>
using namespace std;
int main(){
string a;
cin>>a;
sort(a.begin(),a.end());
if (a=="abc") {
cout<<"Yes";
}
else
{
cout<<"No";
}
}
| ### Prompt
Develop a solution in Cpp to the problem described below:
You are given a string S of length 3 consisting of `a`, `b` and `c`. Determine if S can be obtained by permuting `abc`.
Constraints
* |S|=3
* S consists of `a`, `b` and `c`.
Input
Input is given from Standard Input in the following format:
S
Output
If S can be obtained by permuting `abc`, print `Yes`; otherwise, print `No`.
Examples
Input
bac
Output
Yes
Input
bab
Output
No
Input
abc
Output
Yes
Input
aaa
Output
No
### Response
```cpp
#include <bits/stdc++.h>
using namespace std;
int main(){
string a;
cin>>a;
sort(a.begin(),a.end());
if (a=="abc") {
cout<<"Yes";
}
else
{
cout<<"No";
}
}
``` |
#include <bits/stdc++.h>
using namespace std;
int main(){
int n,m;
cin >> n >> m;
cout << (100*(n-m)+1900*m)*(1<<m) << endl;
} | ### Prompt
Construct a CPP code solution to the problem outlined:
Takahashi is now competing in a programming contest, but he received TLE in a problem where the answer is `YES` or `NO`.
When he checked the detailed status of the submission, there were N test cases in the problem, and the code received TLE in M of those cases.
Then, he rewrote the code to correctly solve each of those M cases with 1/2 probability in 1900 milliseconds, and correctly solve each of the other N-M cases without fail in 100 milliseconds.
Now, he goes through the following process:
* Submit the code.
* Wait until the code finishes execution on all the cases.
* If the code fails to correctly solve some of the M cases, submit it again.
* Repeat until the code correctly solve all the cases in one submission.
Let the expected value of the total execution time of the code be X milliseconds. Print X (as an integer).
Constraints
* All input values are integers.
* 1 \leq N \leq 100
* 1 \leq M \leq {\rm min}(N, 5)
Input
Input is given from Standard Input in the following format:
N M
Output
Print X, the expected value of the total execution time of the code, as an integer. It can be proved that, under the constraints in this problem, X is an integer not exceeding 10^9.
Examples
Input
1 1
Output
3800
Input
10 2
Output
18400
Input
100 5
Output
608000
### Response
```cpp
#include <bits/stdc++.h>
using namespace std;
int main(){
int n,m;
cin >> n >> m;
cout << (100*(n-m)+1900*m)*(1<<m) << endl;
}
``` |
#include <bits/stdc++.h>
using namespace std;
int n, m, ans = 0;
int main ()
{
cin >> n >> m;
cout << pow(2, m) * (m * 1900 + (n - m) * 100);
} | ### Prompt
Construct a cpp code solution to the problem outlined:
Takahashi is now competing in a programming contest, but he received TLE in a problem where the answer is `YES` or `NO`.
When he checked the detailed status of the submission, there were N test cases in the problem, and the code received TLE in M of those cases.
Then, he rewrote the code to correctly solve each of those M cases with 1/2 probability in 1900 milliseconds, and correctly solve each of the other N-M cases without fail in 100 milliseconds.
Now, he goes through the following process:
* Submit the code.
* Wait until the code finishes execution on all the cases.
* If the code fails to correctly solve some of the M cases, submit it again.
* Repeat until the code correctly solve all the cases in one submission.
Let the expected value of the total execution time of the code be X milliseconds. Print X (as an integer).
Constraints
* All input values are integers.
* 1 \leq N \leq 100
* 1 \leq M \leq {\rm min}(N, 5)
Input
Input is given from Standard Input in the following format:
N M
Output
Print X, the expected value of the total execution time of the code, as an integer. It can be proved that, under the constraints in this problem, X is an integer not exceeding 10^9.
Examples
Input
1 1
Output
3800
Input
10 2
Output
18400
Input
100 5
Output
608000
### Response
```cpp
#include <bits/stdc++.h>
using namespace std;
int n, m, ans = 0;
int main ()
{
cin >> n >> m;
cout << pow(2, m) * (m * 1900 + (n - m) * 100);
}
``` |
#include <iostream>
using namespace std;
int main()
{
int n, m;
cin >> n >> m;
cout << 100 * ((18 * m + n) << m) << endl;
return 0;
} | ### Prompt
Please formulate a CPP solution to the following problem:
Takahashi is now competing in a programming contest, but he received TLE in a problem where the answer is `YES` or `NO`.
When he checked the detailed status of the submission, there were N test cases in the problem, and the code received TLE in M of those cases.
Then, he rewrote the code to correctly solve each of those M cases with 1/2 probability in 1900 milliseconds, and correctly solve each of the other N-M cases without fail in 100 milliseconds.
Now, he goes through the following process:
* Submit the code.
* Wait until the code finishes execution on all the cases.
* If the code fails to correctly solve some of the M cases, submit it again.
* Repeat until the code correctly solve all the cases in one submission.
Let the expected value of the total execution time of the code be X milliseconds. Print X (as an integer).
Constraints
* All input values are integers.
* 1 \leq N \leq 100
* 1 \leq M \leq {\rm min}(N, 5)
Input
Input is given from Standard Input in the following format:
N M
Output
Print X, the expected value of the total execution time of the code, as an integer. It can be proved that, under the constraints in this problem, X is an integer not exceeding 10^9.
Examples
Input
1 1
Output
3800
Input
10 2
Output
18400
Input
100 5
Output
608000
### Response
```cpp
#include <iostream>
using namespace std;
int main()
{
int n, m;
cin >> n >> m;
cout << 100 * ((18 * m + n) << m) << endl;
return 0;
}
``` |
#include <iostream>
#include <cmath>
int main() {
int m, n;
std::cin >> n >> m;
int time = ((n - m) * 100 + 1900 * m) * pow(2, m);
std::cout << time;
return 0;
} | ### Prompt
Develop a solution in Cpp to the problem described below:
Takahashi is now competing in a programming contest, but he received TLE in a problem where the answer is `YES` or `NO`.
When he checked the detailed status of the submission, there were N test cases in the problem, and the code received TLE in M of those cases.
Then, he rewrote the code to correctly solve each of those M cases with 1/2 probability in 1900 milliseconds, and correctly solve each of the other N-M cases without fail in 100 milliseconds.
Now, he goes through the following process:
* Submit the code.
* Wait until the code finishes execution on all the cases.
* If the code fails to correctly solve some of the M cases, submit it again.
* Repeat until the code correctly solve all the cases in one submission.
Let the expected value of the total execution time of the code be X milliseconds. Print X (as an integer).
Constraints
* All input values are integers.
* 1 \leq N \leq 100
* 1 \leq M \leq {\rm min}(N, 5)
Input
Input is given from Standard Input in the following format:
N M
Output
Print X, the expected value of the total execution time of the code, as an integer. It can be proved that, under the constraints in this problem, X is an integer not exceeding 10^9.
Examples
Input
1 1
Output
3800
Input
10 2
Output
18400
Input
100 5
Output
608000
### Response
```cpp
#include <iostream>
#include <cmath>
int main() {
int m, n;
std::cin >> n >> m;
int time = ((n - m) * 100 + 1900 * m) * pow(2, m);
std::cout << time;
return 0;
}
``` |
#include<bits/stdc++.h>
using namespace std;
int main(){
int n,m;cin>>n>>m;
cout <<(int)pow(2,m)*(1900*m+100*(n-m))<<endl;
} | ### Prompt
Please formulate a CPP solution to the following problem:
Takahashi is now competing in a programming contest, but he received TLE in a problem where the answer is `YES` or `NO`.
When he checked the detailed status of the submission, there were N test cases in the problem, and the code received TLE in M of those cases.
Then, he rewrote the code to correctly solve each of those M cases with 1/2 probability in 1900 milliseconds, and correctly solve each of the other N-M cases without fail in 100 milliseconds.
Now, he goes through the following process:
* Submit the code.
* Wait until the code finishes execution on all the cases.
* If the code fails to correctly solve some of the M cases, submit it again.
* Repeat until the code correctly solve all the cases in one submission.
Let the expected value of the total execution time of the code be X milliseconds. Print X (as an integer).
Constraints
* All input values are integers.
* 1 \leq N \leq 100
* 1 \leq M \leq {\rm min}(N, 5)
Input
Input is given from Standard Input in the following format:
N M
Output
Print X, the expected value of the total execution time of the code, as an integer. It can be proved that, under the constraints in this problem, X is an integer not exceeding 10^9.
Examples
Input
1 1
Output
3800
Input
10 2
Output
18400
Input
100 5
Output
608000
### Response
```cpp
#include<bits/stdc++.h>
using namespace std;
int main(){
int n,m;cin>>n>>m;
cout <<(int)pow(2,m)*(1900*m+100*(n-m))<<endl;
}
``` |
#include <bits/stdc++.h>
using namespace std;
int main(){
int N,M;
cin>>N>>M;
cout<<(100*(N-M)+1900*M)*(int)pow(2,M)<<endl;
}
| ### Prompt
Your task is to create a Cpp solution to the following problem:
Takahashi is now competing in a programming contest, but he received TLE in a problem where the answer is `YES` or `NO`.
When he checked the detailed status of the submission, there were N test cases in the problem, and the code received TLE in M of those cases.
Then, he rewrote the code to correctly solve each of those M cases with 1/2 probability in 1900 milliseconds, and correctly solve each of the other N-M cases without fail in 100 milliseconds.
Now, he goes through the following process:
* Submit the code.
* Wait until the code finishes execution on all the cases.
* If the code fails to correctly solve some of the M cases, submit it again.
* Repeat until the code correctly solve all the cases in one submission.
Let the expected value of the total execution time of the code be X milliseconds. Print X (as an integer).
Constraints
* All input values are integers.
* 1 \leq N \leq 100
* 1 \leq M \leq {\rm min}(N, 5)
Input
Input is given from Standard Input in the following format:
N M
Output
Print X, the expected value of the total execution time of the code, as an integer. It can be proved that, under the constraints in this problem, X is an integer not exceeding 10^9.
Examples
Input
1 1
Output
3800
Input
10 2
Output
18400
Input
100 5
Output
608000
### Response
```cpp
#include <bits/stdc++.h>
using namespace std;
int main(){
int N,M;
cin>>N>>M;
cout<<(100*(N-M)+1900*M)*(int)pow(2,M)<<endl;
}
``` |
#include <bits/stdc++.h>
using namespace std;
int main() {
int N,M,X;
cin >> N >> M;
X = (1900 * M + 100 * (N-M))*pow(2,M);
cout << X;
}
| ### Prompt
Generate a Cpp solution to the following problem:
Takahashi is now competing in a programming contest, but he received TLE in a problem where the answer is `YES` or `NO`.
When he checked the detailed status of the submission, there were N test cases in the problem, and the code received TLE in M of those cases.
Then, he rewrote the code to correctly solve each of those M cases with 1/2 probability in 1900 milliseconds, and correctly solve each of the other N-M cases without fail in 100 milliseconds.
Now, he goes through the following process:
* Submit the code.
* Wait until the code finishes execution on all the cases.
* If the code fails to correctly solve some of the M cases, submit it again.
* Repeat until the code correctly solve all the cases in one submission.
Let the expected value of the total execution time of the code be X milliseconds. Print X (as an integer).
Constraints
* All input values are integers.
* 1 \leq N \leq 100
* 1 \leq M \leq {\rm min}(N, 5)
Input
Input is given from Standard Input in the following format:
N M
Output
Print X, the expected value of the total execution time of the code, as an integer. It can be proved that, under the constraints in this problem, X is an integer not exceeding 10^9.
Examples
Input
1 1
Output
3800
Input
10 2
Output
18400
Input
100 5
Output
608000
### Response
```cpp
#include <bits/stdc++.h>
using namespace std;
int main() {
int N,M,X;
cin >> N >> M;
X = (1900 * M + 100 * (N-M))*pow(2,M);
cout << X;
}
``` |
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
int main() {
ll N, M; cin >> N >> M;
cout << (1LL << M)*(1800*M+100*N) << endl;
} | ### Prompt
In cpp, your task is to solve the following problem:
Takahashi is now competing in a programming contest, but he received TLE in a problem where the answer is `YES` or `NO`.
When he checked the detailed status of the submission, there were N test cases in the problem, and the code received TLE in M of those cases.
Then, he rewrote the code to correctly solve each of those M cases with 1/2 probability in 1900 milliseconds, and correctly solve each of the other N-M cases without fail in 100 milliseconds.
Now, he goes through the following process:
* Submit the code.
* Wait until the code finishes execution on all the cases.
* If the code fails to correctly solve some of the M cases, submit it again.
* Repeat until the code correctly solve all the cases in one submission.
Let the expected value of the total execution time of the code be X milliseconds. Print X (as an integer).
Constraints
* All input values are integers.
* 1 \leq N \leq 100
* 1 \leq M \leq {\rm min}(N, 5)
Input
Input is given from Standard Input in the following format:
N M
Output
Print X, the expected value of the total execution time of the code, as an integer. It can be proved that, under the constraints in this problem, X is an integer not exceeding 10^9.
Examples
Input
1 1
Output
3800
Input
10 2
Output
18400
Input
100 5
Output
608000
### Response
```cpp
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
int main() {
ll N, M; cin >> N >> M;
cout << (1LL << M)*(1800*M+100*N) << endl;
}
``` |
#include<bits/stdc++.h>
using namespace std;
int main(){
int N; int M; cin >> N >> M;
//
int tim=1900*M+100*(N-M);
cout << tim*(1<<M) << endl;
} | ### Prompt
Please provide a Cpp coded solution to the problem described below:
Takahashi is now competing in a programming contest, but he received TLE in a problem where the answer is `YES` or `NO`.
When he checked the detailed status of the submission, there were N test cases in the problem, and the code received TLE in M of those cases.
Then, he rewrote the code to correctly solve each of those M cases with 1/2 probability in 1900 milliseconds, and correctly solve each of the other N-M cases without fail in 100 milliseconds.
Now, he goes through the following process:
* Submit the code.
* Wait until the code finishes execution on all the cases.
* If the code fails to correctly solve some of the M cases, submit it again.
* Repeat until the code correctly solve all the cases in one submission.
Let the expected value of the total execution time of the code be X milliseconds. Print X (as an integer).
Constraints
* All input values are integers.
* 1 \leq N \leq 100
* 1 \leq M \leq {\rm min}(N, 5)
Input
Input is given from Standard Input in the following format:
N M
Output
Print X, the expected value of the total execution time of the code, as an integer. It can be proved that, under the constraints in this problem, X is an integer not exceeding 10^9.
Examples
Input
1 1
Output
3800
Input
10 2
Output
18400
Input
100 5
Output
608000
### Response
```cpp
#include<bits/stdc++.h>
using namespace std;
int main(){
int N; int M; cin >> N >> M;
//
int tim=1900*M+100*(N-M);
cout << tim*(1<<M) << endl;
}
``` |
#include<iostream>
using namespace std;
int main()
{
int ans=1,n,m;
cin>>n>>m;
for (int i=0;i<m;i++) ans*=2;
ans*=m*1900+100*(n-m);
cout<<ans;
return 0;
} | ### Prompt
Develop a solution in Cpp to the problem described below:
Takahashi is now competing in a programming contest, but he received TLE in a problem where the answer is `YES` or `NO`.
When he checked the detailed status of the submission, there were N test cases in the problem, and the code received TLE in M of those cases.
Then, he rewrote the code to correctly solve each of those M cases with 1/2 probability in 1900 milliseconds, and correctly solve each of the other N-M cases without fail in 100 milliseconds.
Now, he goes through the following process:
* Submit the code.
* Wait until the code finishes execution on all the cases.
* If the code fails to correctly solve some of the M cases, submit it again.
* Repeat until the code correctly solve all the cases in one submission.
Let the expected value of the total execution time of the code be X milliseconds. Print X (as an integer).
Constraints
* All input values are integers.
* 1 \leq N \leq 100
* 1 \leq M \leq {\rm min}(N, 5)
Input
Input is given from Standard Input in the following format:
N M
Output
Print X, the expected value of the total execution time of the code, as an integer. It can be proved that, under the constraints in this problem, X is an integer not exceeding 10^9.
Examples
Input
1 1
Output
3800
Input
10 2
Output
18400
Input
100 5
Output
608000
### Response
```cpp
#include<iostream>
using namespace std;
int main()
{
int ans=1,n,m;
cin>>n>>m;
for (int i=0;i<m;i++) ans*=2;
ans*=m*1900+100*(n-m);
cout<<ans;
return 0;
}
``` |
#include <iostream>
using namespace std;
int main(void) {
int N,M;
cin >> N >> M;
int pot = (1 << M);
cout << ((1900*M)+(100*(N-M)))*pot << endl;
return 0;
}
| ### Prompt
In CPP, your task is to solve the following problem:
Takahashi is now competing in a programming contest, but he received TLE in a problem where the answer is `YES` or `NO`.
When he checked the detailed status of the submission, there were N test cases in the problem, and the code received TLE in M of those cases.
Then, he rewrote the code to correctly solve each of those M cases with 1/2 probability in 1900 milliseconds, and correctly solve each of the other N-M cases without fail in 100 milliseconds.
Now, he goes through the following process:
* Submit the code.
* Wait until the code finishes execution on all the cases.
* If the code fails to correctly solve some of the M cases, submit it again.
* Repeat until the code correctly solve all the cases in one submission.
Let the expected value of the total execution time of the code be X milliseconds. Print X (as an integer).
Constraints
* All input values are integers.
* 1 \leq N \leq 100
* 1 \leq M \leq {\rm min}(N, 5)
Input
Input is given from Standard Input in the following format:
N M
Output
Print X, the expected value of the total execution time of the code, as an integer. It can be proved that, under the constraints in this problem, X is an integer not exceeding 10^9.
Examples
Input
1 1
Output
3800
Input
10 2
Output
18400
Input
100 5
Output
608000
### Response
```cpp
#include <iostream>
using namespace std;
int main(void) {
int N,M;
cin >> N >> M;
int pot = (1 << M);
cout << ((1900*M)+(100*(N-M)))*pot << endl;
return 0;
}
``` |
#include <bits/stdc++.h>
using namespace std;
int main() {
int N, M;
cin >> N >> M;
cout << pow(2, M) * (1800 * M + 100 * N) << endl;
} | ### Prompt
Generate a CPP solution to the following problem:
Takahashi is now competing in a programming contest, but he received TLE in a problem where the answer is `YES` or `NO`.
When he checked the detailed status of the submission, there were N test cases in the problem, and the code received TLE in M of those cases.
Then, he rewrote the code to correctly solve each of those M cases with 1/2 probability in 1900 milliseconds, and correctly solve each of the other N-M cases without fail in 100 milliseconds.
Now, he goes through the following process:
* Submit the code.
* Wait until the code finishes execution on all the cases.
* If the code fails to correctly solve some of the M cases, submit it again.
* Repeat until the code correctly solve all the cases in one submission.
Let the expected value of the total execution time of the code be X milliseconds. Print X (as an integer).
Constraints
* All input values are integers.
* 1 \leq N \leq 100
* 1 \leq M \leq {\rm min}(N, 5)
Input
Input is given from Standard Input in the following format:
N M
Output
Print X, the expected value of the total execution time of the code, as an integer. It can be proved that, under the constraints in this problem, X is an integer not exceeding 10^9.
Examples
Input
1 1
Output
3800
Input
10 2
Output
18400
Input
100 5
Output
608000
### Response
```cpp
#include <bits/stdc++.h>
using namespace std;
int main() {
int N, M;
cin >> N >> M;
cout << pow(2, M) * (1800 * M + 100 * N) << endl;
}
``` |
#include<iostream>
using namespace std;
int n,m;
int main()
{
cin>>n>>m;
int p=1;
for(int i=0;i<m;i++)
p*=2;
cout<<((n-m)*100+1900*m)*p<<endl;
} | ### Prompt
Please provide a Cpp coded solution to the problem described below:
Takahashi is now competing in a programming contest, but he received TLE in a problem where the answer is `YES` or `NO`.
When he checked the detailed status of the submission, there were N test cases in the problem, and the code received TLE in M of those cases.
Then, he rewrote the code to correctly solve each of those M cases with 1/2 probability in 1900 milliseconds, and correctly solve each of the other N-M cases without fail in 100 milliseconds.
Now, he goes through the following process:
* Submit the code.
* Wait until the code finishes execution on all the cases.
* If the code fails to correctly solve some of the M cases, submit it again.
* Repeat until the code correctly solve all the cases in one submission.
Let the expected value of the total execution time of the code be X milliseconds. Print X (as an integer).
Constraints
* All input values are integers.
* 1 \leq N \leq 100
* 1 \leq M \leq {\rm min}(N, 5)
Input
Input is given from Standard Input in the following format:
N M
Output
Print X, the expected value of the total execution time of the code, as an integer. It can be proved that, under the constraints in this problem, X is an integer not exceeding 10^9.
Examples
Input
1 1
Output
3800
Input
10 2
Output
18400
Input
100 5
Output
608000
### Response
```cpp
#include<iostream>
using namespace std;
int n,m;
int main()
{
cin>>n>>m;
int p=1;
for(int i=0;i<m;i++)
p*=2;
cout<<((n-m)*100+1900*m)*p<<endl;
}
``` |
#include <bits/stdc++.h>
using namespace std;
int main() {
int N, M;
cin >> N >> M;
cout << (M*1900+(N-M)*100)*(pow(2,M)) << endl;
}
| ### Prompt
Develop a solution in CPP to the problem described below:
Takahashi is now competing in a programming contest, but he received TLE in a problem where the answer is `YES` or `NO`.
When he checked the detailed status of the submission, there were N test cases in the problem, and the code received TLE in M of those cases.
Then, he rewrote the code to correctly solve each of those M cases with 1/2 probability in 1900 milliseconds, and correctly solve each of the other N-M cases without fail in 100 milliseconds.
Now, he goes through the following process:
* Submit the code.
* Wait until the code finishes execution on all the cases.
* If the code fails to correctly solve some of the M cases, submit it again.
* Repeat until the code correctly solve all the cases in one submission.
Let the expected value of the total execution time of the code be X milliseconds. Print X (as an integer).
Constraints
* All input values are integers.
* 1 \leq N \leq 100
* 1 \leq M \leq {\rm min}(N, 5)
Input
Input is given from Standard Input in the following format:
N M
Output
Print X, the expected value of the total execution time of the code, as an integer. It can be proved that, under the constraints in this problem, X is an integer not exceeding 10^9.
Examples
Input
1 1
Output
3800
Input
10 2
Output
18400
Input
100 5
Output
608000
### Response
```cpp
#include <bits/stdc++.h>
using namespace std;
int main() {
int N, M;
cin >> N >> M;
cout << (M*1900+(N-M)*100)*(pow(2,M)) << endl;
}
``` |
#include <bits/stdc++.h>
using namespace std;
int N, M;
int main(){
cin >> N >> M;
int ans=1800*M + 100*N;
ans*=pow(2,M);
cout << ans << endl;
}
| ### Prompt
Please create a solution in CPP to the following problem:
Takahashi is now competing in a programming contest, but he received TLE in a problem where the answer is `YES` or `NO`.
When he checked the detailed status of the submission, there were N test cases in the problem, and the code received TLE in M of those cases.
Then, he rewrote the code to correctly solve each of those M cases with 1/2 probability in 1900 milliseconds, and correctly solve each of the other N-M cases without fail in 100 milliseconds.
Now, he goes through the following process:
* Submit the code.
* Wait until the code finishes execution on all the cases.
* If the code fails to correctly solve some of the M cases, submit it again.
* Repeat until the code correctly solve all the cases in one submission.
Let the expected value of the total execution time of the code be X milliseconds. Print X (as an integer).
Constraints
* All input values are integers.
* 1 \leq N \leq 100
* 1 \leq M \leq {\rm min}(N, 5)
Input
Input is given from Standard Input in the following format:
N M
Output
Print X, the expected value of the total execution time of the code, as an integer. It can be proved that, under the constraints in this problem, X is an integer not exceeding 10^9.
Examples
Input
1 1
Output
3800
Input
10 2
Output
18400
Input
100 5
Output
608000
### Response
```cpp
#include <bits/stdc++.h>
using namespace std;
int N, M;
int main(){
cin >> N >> M;
int ans=1800*M + 100*N;
ans*=pow(2,M);
cout << ans << endl;
}
``` |
#include <iostream>
#include <math.h>
using namespace std;
int main()
{
int N, M;
cin >> N >> M;
cout << ((100 * N) + (1800 * M)) * pow(2, M);
return 0;
}
| ### Prompt
Please formulate a CPP solution to the following problem:
Takahashi is now competing in a programming contest, but he received TLE in a problem where the answer is `YES` or `NO`.
When he checked the detailed status of the submission, there were N test cases in the problem, and the code received TLE in M of those cases.
Then, he rewrote the code to correctly solve each of those M cases with 1/2 probability in 1900 milliseconds, and correctly solve each of the other N-M cases without fail in 100 milliseconds.
Now, he goes through the following process:
* Submit the code.
* Wait until the code finishes execution on all the cases.
* If the code fails to correctly solve some of the M cases, submit it again.
* Repeat until the code correctly solve all the cases in one submission.
Let the expected value of the total execution time of the code be X milliseconds. Print X (as an integer).
Constraints
* All input values are integers.
* 1 \leq N \leq 100
* 1 \leq M \leq {\rm min}(N, 5)
Input
Input is given from Standard Input in the following format:
N M
Output
Print X, the expected value of the total execution time of the code, as an integer. It can be proved that, under the constraints in this problem, X is an integer not exceeding 10^9.
Examples
Input
1 1
Output
3800
Input
10 2
Output
18400
Input
100 5
Output
608000
### Response
```cpp
#include <iostream>
#include <math.h>
using namespace std;
int main()
{
int N, M;
cin >> N >> M;
cout << ((100 * N) + (1800 * M)) * pow(2, M);
return 0;
}
``` |
#include <iostream>
using namespace std;
int main(){
int N,M;
cin >> N >> M;
cout << ((1<<M)*(100*N+1800*M)) << endl;
return 0;
} | ### Prompt
Your challenge is to write a Cpp solution to the following problem:
Takahashi is now competing in a programming contest, but he received TLE in a problem where the answer is `YES` or `NO`.
When he checked the detailed status of the submission, there were N test cases in the problem, and the code received TLE in M of those cases.
Then, he rewrote the code to correctly solve each of those M cases with 1/2 probability in 1900 milliseconds, and correctly solve each of the other N-M cases without fail in 100 milliseconds.
Now, he goes through the following process:
* Submit the code.
* Wait until the code finishes execution on all the cases.
* If the code fails to correctly solve some of the M cases, submit it again.
* Repeat until the code correctly solve all the cases in one submission.
Let the expected value of the total execution time of the code be X milliseconds. Print X (as an integer).
Constraints
* All input values are integers.
* 1 \leq N \leq 100
* 1 \leq M \leq {\rm min}(N, 5)
Input
Input is given from Standard Input in the following format:
N M
Output
Print X, the expected value of the total execution time of the code, as an integer. It can be proved that, under the constraints in this problem, X is an integer not exceeding 10^9.
Examples
Input
1 1
Output
3800
Input
10 2
Output
18400
Input
100 5
Output
608000
### Response
```cpp
#include <iostream>
using namespace std;
int main(){
int N,M;
cin >> N >> M;
cout << ((1<<M)*(100*N+1800*M)) << endl;
return 0;
}
``` |
#include <iostream>
using namespace std;
int main(void) {
int N, M;
cin >> N >> M;
cout << (((N - M) * 100 + 1900*M) << M) << endl;
return 0;
} | ### Prompt
Please create a solution in Cpp to the following problem:
Takahashi is now competing in a programming contest, but he received TLE in a problem where the answer is `YES` or `NO`.
When he checked the detailed status of the submission, there were N test cases in the problem, and the code received TLE in M of those cases.
Then, he rewrote the code to correctly solve each of those M cases with 1/2 probability in 1900 milliseconds, and correctly solve each of the other N-M cases without fail in 100 milliseconds.
Now, he goes through the following process:
* Submit the code.
* Wait until the code finishes execution on all the cases.
* If the code fails to correctly solve some of the M cases, submit it again.
* Repeat until the code correctly solve all the cases in one submission.
Let the expected value of the total execution time of the code be X milliseconds. Print X (as an integer).
Constraints
* All input values are integers.
* 1 \leq N \leq 100
* 1 \leq M \leq {\rm min}(N, 5)
Input
Input is given from Standard Input in the following format:
N M
Output
Print X, the expected value of the total execution time of the code, as an integer. It can be proved that, under the constraints in this problem, X is an integer not exceeding 10^9.
Examples
Input
1 1
Output
3800
Input
10 2
Output
18400
Input
100 5
Output
608000
### Response
```cpp
#include <iostream>
using namespace std;
int main(void) {
int N, M;
cin >> N >> M;
cout << (((N - M) * 100 + 1900*M) << M) << endl;
return 0;
}
``` |
#include <bits/stdc++.h>
using namespace std;
int main(){
int n, m;
cin >> n >> m;
cout << pow(2, m)*(100*n + 1800*m) << endl;
} | ### Prompt
Please formulate a cpp solution to the following problem:
Takahashi is now competing in a programming contest, but he received TLE in a problem where the answer is `YES` or `NO`.
When he checked the detailed status of the submission, there were N test cases in the problem, and the code received TLE in M of those cases.
Then, he rewrote the code to correctly solve each of those M cases with 1/2 probability in 1900 milliseconds, and correctly solve each of the other N-M cases without fail in 100 milliseconds.
Now, he goes through the following process:
* Submit the code.
* Wait until the code finishes execution on all the cases.
* If the code fails to correctly solve some of the M cases, submit it again.
* Repeat until the code correctly solve all the cases in one submission.
Let the expected value of the total execution time of the code be X milliseconds. Print X (as an integer).
Constraints
* All input values are integers.
* 1 \leq N \leq 100
* 1 \leq M \leq {\rm min}(N, 5)
Input
Input is given from Standard Input in the following format:
N M
Output
Print X, the expected value of the total execution time of the code, as an integer. It can be proved that, under the constraints in this problem, X is an integer not exceeding 10^9.
Examples
Input
1 1
Output
3800
Input
10 2
Output
18400
Input
100 5
Output
608000
### Response
```cpp
#include <bits/stdc++.h>
using namespace std;
int main(){
int n, m;
cin >> n >> m;
cout << pow(2, m)*(100*n + 1800*m) << endl;
}
``` |
#include<iostream>
using namespace std;
int main()
{
int n,m,res;
cin >> n >> m;
res=(1900*m+100*(n-m))<<m;
cout << res << endl;
return 0;
} | ### Prompt
Please formulate a cpp solution to the following problem:
Takahashi is now competing in a programming contest, but he received TLE in a problem where the answer is `YES` or `NO`.
When he checked the detailed status of the submission, there were N test cases in the problem, and the code received TLE in M of those cases.
Then, he rewrote the code to correctly solve each of those M cases with 1/2 probability in 1900 milliseconds, and correctly solve each of the other N-M cases without fail in 100 milliseconds.
Now, he goes through the following process:
* Submit the code.
* Wait until the code finishes execution on all the cases.
* If the code fails to correctly solve some of the M cases, submit it again.
* Repeat until the code correctly solve all the cases in one submission.
Let the expected value of the total execution time of the code be X milliseconds. Print X (as an integer).
Constraints
* All input values are integers.
* 1 \leq N \leq 100
* 1 \leq M \leq {\rm min}(N, 5)
Input
Input is given from Standard Input in the following format:
N M
Output
Print X, the expected value of the total execution time of the code, as an integer. It can be proved that, under the constraints in this problem, X is an integer not exceeding 10^9.
Examples
Input
1 1
Output
3800
Input
10 2
Output
18400
Input
100 5
Output
608000
### Response
```cpp
#include<iostream>
using namespace std;
int main()
{
int n,m,res;
cin >> n >> m;
res=(1900*m+100*(n-m))<<m;
cout << res << endl;
return 0;
}
``` |
#include <bits/stdc++.h>
using namespace std;
int main()
{
int n, m; cin>>n>>m;
printf("%d\n", (100*n+1800*m)<<m);
} | ### Prompt
In CPP, your task is to solve the following problem:
Takahashi is now competing in a programming contest, but he received TLE in a problem where the answer is `YES` or `NO`.
When he checked the detailed status of the submission, there were N test cases in the problem, and the code received TLE in M of those cases.
Then, he rewrote the code to correctly solve each of those M cases with 1/2 probability in 1900 milliseconds, and correctly solve each of the other N-M cases without fail in 100 milliseconds.
Now, he goes through the following process:
* Submit the code.
* Wait until the code finishes execution on all the cases.
* If the code fails to correctly solve some of the M cases, submit it again.
* Repeat until the code correctly solve all the cases in one submission.
Let the expected value of the total execution time of the code be X milliseconds. Print X (as an integer).
Constraints
* All input values are integers.
* 1 \leq N \leq 100
* 1 \leq M \leq {\rm min}(N, 5)
Input
Input is given from Standard Input in the following format:
N M
Output
Print X, the expected value of the total execution time of the code, as an integer. It can be proved that, under the constraints in this problem, X is an integer not exceeding 10^9.
Examples
Input
1 1
Output
3800
Input
10 2
Output
18400
Input
100 5
Output
608000
### Response
```cpp
#include <bits/stdc++.h>
using namespace std;
int main()
{
int n, m; cin>>n>>m;
printf("%d\n", (100*n+1800*m)<<m);
}
``` |
#include <iostream>
#include <cmath>
int main()
{
int N, M;
std::cin >> N >> M;
int timePerTest = M*1900 + (N-M)*100;
std::cout << (1LL<<M)*timePerTest;
} | ### Prompt
Please formulate a Cpp solution to the following problem:
Takahashi is now competing in a programming contest, but he received TLE in a problem where the answer is `YES` or `NO`.
When he checked the detailed status of the submission, there were N test cases in the problem, and the code received TLE in M of those cases.
Then, he rewrote the code to correctly solve each of those M cases with 1/2 probability in 1900 milliseconds, and correctly solve each of the other N-M cases without fail in 100 milliseconds.
Now, he goes through the following process:
* Submit the code.
* Wait until the code finishes execution on all the cases.
* If the code fails to correctly solve some of the M cases, submit it again.
* Repeat until the code correctly solve all the cases in one submission.
Let the expected value of the total execution time of the code be X milliseconds. Print X (as an integer).
Constraints
* All input values are integers.
* 1 \leq N \leq 100
* 1 \leq M \leq {\rm min}(N, 5)
Input
Input is given from Standard Input in the following format:
N M
Output
Print X, the expected value of the total execution time of the code, as an integer. It can be proved that, under the constraints in this problem, X is an integer not exceeding 10^9.
Examples
Input
1 1
Output
3800
Input
10 2
Output
18400
Input
100 5
Output
608000
### Response
```cpp
#include <iostream>
#include <cmath>
int main()
{
int N, M;
std::cin >> N >> M;
int timePerTest = M*1900 + (N-M)*100;
std::cout << (1LL<<M)*timePerTest;
}
``` |
#include <iostream>
int main(){int n,m;std::cin>>n>>m;printf("%d\n",((18*m+n)<<m)*100);} | ### Prompt
Generate a CPP solution to the following problem:
Takahashi is now competing in a programming contest, but he received TLE in a problem where the answer is `YES` or `NO`.
When he checked the detailed status of the submission, there were N test cases in the problem, and the code received TLE in M of those cases.
Then, he rewrote the code to correctly solve each of those M cases with 1/2 probability in 1900 milliseconds, and correctly solve each of the other N-M cases without fail in 100 milliseconds.
Now, he goes through the following process:
* Submit the code.
* Wait until the code finishes execution on all the cases.
* If the code fails to correctly solve some of the M cases, submit it again.
* Repeat until the code correctly solve all the cases in one submission.
Let the expected value of the total execution time of the code be X milliseconds. Print X (as an integer).
Constraints
* All input values are integers.
* 1 \leq N \leq 100
* 1 \leq M \leq {\rm min}(N, 5)
Input
Input is given from Standard Input in the following format:
N M
Output
Print X, the expected value of the total execution time of the code, as an integer. It can be proved that, under the constraints in this problem, X is an integer not exceeding 10^9.
Examples
Input
1 1
Output
3800
Input
10 2
Output
18400
Input
100 5
Output
608000
### Response
```cpp
#include <iostream>
int main(){int n,m;std::cin>>n>>m;printf("%d\n",((18*m+n)<<m)*100);}
``` |
#include<cstdio>
#include<cmath>
int main(){
int n,m;
scanf("%d %d",&n,&m);
printf("%d",(int)( (1900 * m + 100 * (n-m) ) * pow(2,m) ) );
return 0;
} | ### Prompt
Your task is to create a Cpp solution to the following problem:
Takahashi is now competing in a programming contest, but he received TLE in a problem where the answer is `YES` or `NO`.
When he checked the detailed status of the submission, there were N test cases in the problem, and the code received TLE in M of those cases.
Then, he rewrote the code to correctly solve each of those M cases with 1/2 probability in 1900 milliseconds, and correctly solve each of the other N-M cases without fail in 100 milliseconds.
Now, he goes through the following process:
* Submit the code.
* Wait until the code finishes execution on all the cases.
* If the code fails to correctly solve some of the M cases, submit it again.
* Repeat until the code correctly solve all the cases in one submission.
Let the expected value of the total execution time of the code be X milliseconds. Print X (as an integer).
Constraints
* All input values are integers.
* 1 \leq N \leq 100
* 1 \leq M \leq {\rm min}(N, 5)
Input
Input is given from Standard Input in the following format:
N M
Output
Print X, the expected value of the total execution time of the code, as an integer. It can be proved that, under the constraints in this problem, X is an integer not exceeding 10^9.
Examples
Input
1 1
Output
3800
Input
10 2
Output
18400
Input
100 5
Output
608000
### Response
```cpp
#include<cstdio>
#include<cmath>
int main(){
int n,m;
scanf("%d %d",&n,&m);
printf("%d",(int)( (1900 * m + 100 * (n-m) ) * pow(2,m) ) );
return 0;
}
``` |
#include "bits/stdc++.h"
using namespace std;
int main() {
int N, M;
cin >> N >> M;
cout << (1900*M+(N-M)*100)*pow(2,M)<<endl;
return 0;
}
| ### Prompt
Construct a CPP code solution to the problem outlined:
Takahashi is now competing in a programming contest, but he received TLE in a problem where the answer is `YES` or `NO`.
When he checked the detailed status of the submission, there were N test cases in the problem, and the code received TLE in M of those cases.
Then, he rewrote the code to correctly solve each of those M cases with 1/2 probability in 1900 milliseconds, and correctly solve each of the other N-M cases without fail in 100 milliseconds.
Now, he goes through the following process:
* Submit the code.
* Wait until the code finishes execution on all the cases.
* If the code fails to correctly solve some of the M cases, submit it again.
* Repeat until the code correctly solve all the cases in one submission.
Let the expected value of the total execution time of the code be X milliseconds. Print X (as an integer).
Constraints
* All input values are integers.
* 1 \leq N \leq 100
* 1 \leq M \leq {\rm min}(N, 5)
Input
Input is given from Standard Input in the following format:
N M
Output
Print X, the expected value of the total execution time of the code, as an integer. It can be proved that, under the constraints in this problem, X is an integer not exceeding 10^9.
Examples
Input
1 1
Output
3800
Input
10 2
Output
18400
Input
100 5
Output
608000
### Response
```cpp
#include "bits/stdc++.h"
using namespace std;
int main() {
int N, M;
cin >> N >> M;
cout << (1900*M+(N-M)*100)*pow(2,M)<<endl;
return 0;
}
``` |
#include <bits/stdc++.h>
using namespace std;
int main() {
int N,M;
cin >> N >> M;
cout << ((N-M)*100+M*1900)*pow(2,M) << endl;
} | ### Prompt
Develop a solution in CPP to the problem described below:
Takahashi is now competing in a programming contest, but he received TLE in a problem where the answer is `YES` or `NO`.
When he checked the detailed status of the submission, there were N test cases in the problem, and the code received TLE in M of those cases.
Then, he rewrote the code to correctly solve each of those M cases with 1/2 probability in 1900 milliseconds, and correctly solve each of the other N-M cases without fail in 100 milliseconds.
Now, he goes through the following process:
* Submit the code.
* Wait until the code finishes execution on all the cases.
* If the code fails to correctly solve some of the M cases, submit it again.
* Repeat until the code correctly solve all the cases in one submission.
Let the expected value of the total execution time of the code be X milliseconds. Print X (as an integer).
Constraints
* All input values are integers.
* 1 \leq N \leq 100
* 1 \leq M \leq {\rm min}(N, 5)
Input
Input is given from Standard Input in the following format:
N M
Output
Print X, the expected value of the total execution time of the code, as an integer. It can be proved that, under the constraints in this problem, X is an integer not exceeding 10^9.
Examples
Input
1 1
Output
3800
Input
10 2
Output
18400
Input
100 5
Output
608000
### Response
```cpp
#include <bits/stdc++.h>
using namespace std;
int main() {
int N,M;
cin >> N >> M;
cout << ((N-M)*100+M*1900)*pow(2,M) << endl;
}
``` |
#include <bits/stdc++.h>
using namespace std;
int main()
{
int n, m; cin >> n >> m;
cout << (1900*m+100*(n-m))*pow(2,m) << endl;
return 0;
} | ### Prompt
Create a solution in CPP for the following problem:
Takahashi is now competing in a programming contest, but he received TLE in a problem where the answer is `YES` or `NO`.
When he checked the detailed status of the submission, there were N test cases in the problem, and the code received TLE in M of those cases.
Then, he rewrote the code to correctly solve each of those M cases with 1/2 probability in 1900 milliseconds, and correctly solve each of the other N-M cases without fail in 100 milliseconds.
Now, he goes through the following process:
* Submit the code.
* Wait until the code finishes execution on all the cases.
* If the code fails to correctly solve some of the M cases, submit it again.
* Repeat until the code correctly solve all the cases in one submission.
Let the expected value of the total execution time of the code be X milliseconds. Print X (as an integer).
Constraints
* All input values are integers.
* 1 \leq N \leq 100
* 1 \leq M \leq {\rm min}(N, 5)
Input
Input is given from Standard Input in the following format:
N M
Output
Print X, the expected value of the total execution time of the code, as an integer. It can be proved that, under the constraints in this problem, X is an integer not exceeding 10^9.
Examples
Input
1 1
Output
3800
Input
10 2
Output
18400
Input
100 5
Output
608000
### Response
```cpp
#include <bits/stdc++.h>
using namespace std;
int main()
{
int n, m; cin >> n >> m;
cout << (1900*m+100*(n-m))*pow(2,m) << endl;
return 0;
}
``` |
#include<iostream>
int main(){int n,m;std::cin>>n>>m;std::cout<<(m*18+n)*100*(1<<m);} | ### Prompt
In Cpp, your task is to solve the following problem:
Takahashi is now competing in a programming contest, but he received TLE in a problem where the answer is `YES` or `NO`.
When he checked the detailed status of the submission, there were N test cases in the problem, and the code received TLE in M of those cases.
Then, he rewrote the code to correctly solve each of those M cases with 1/2 probability in 1900 milliseconds, and correctly solve each of the other N-M cases without fail in 100 milliseconds.
Now, he goes through the following process:
* Submit the code.
* Wait until the code finishes execution on all the cases.
* If the code fails to correctly solve some of the M cases, submit it again.
* Repeat until the code correctly solve all the cases in one submission.
Let the expected value of the total execution time of the code be X milliseconds. Print X (as an integer).
Constraints
* All input values are integers.
* 1 \leq N \leq 100
* 1 \leq M \leq {\rm min}(N, 5)
Input
Input is given from Standard Input in the following format:
N M
Output
Print X, the expected value of the total execution time of the code, as an integer. It can be proved that, under the constraints in this problem, X is an integer not exceeding 10^9.
Examples
Input
1 1
Output
3800
Input
10 2
Output
18400
Input
100 5
Output
608000
### Response
```cpp
#include<iostream>
int main(){int n,m;std::cin>>n>>m;std::cout<<(m*18+n)*100*(1<<m);}
``` |
#include<iostream>
#include<cmath>
using namespace std;
int main(void){
int n,m;
cin>>n>>m;
cout<<(100*(n-m)+1900*m)*pow(2,m)<<endl;
return 0;
} | ### Prompt
Please formulate a CPP solution to the following problem:
Takahashi is now competing in a programming contest, but he received TLE in a problem where the answer is `YES` or `NO`.
When he checked the detailed status of the submission, there were N test cases in the problem, and the code received TLE in M of those cases.
Then, he rewrote the code to correctly solve each of those M cases with 1/2 probability in 1900 milliseconds, and correctly solve each of the other N-M cases without fail in 100 milliseconds.
Now, he goes through the following process:
* Submit the code.
* Wait until the code finishes execution on all the cases.
* If the code fails to correctly solve some of the M cases, submit it again.
* Repeat until the code correctly solve all the cases in one submission.
Let the expected value of the total execution time of the code be X milliseconds. Print X (as an integer).
Constraints
* All input values are integers.
* 1 \leq N \leq 100
* 1 \leq M \leq {\rm min}(N, 5)
Input
Input is given from Standard Input in the following format:
N M
Output
Print X, the expected value of the total execution time of the code, as an integer. It can be proved that, under the constraints in this problem, X is an integer not exceeding 10^9.
Examples
Input
1 1
Output
3800
Input
10 2
Output
18400
Input
100 5
Output
608000
### Response
```cpp
#include<iostream>
#include<cmath>
using namespace std;
int main(void){
int n,m;
cin>>n>>m;
cout<<(100*(n-m)+1900*m)*pow(2,m)<<endl;
return 0;
}
``` |
#include <iostream>
int main() {
int n, m;
std::cin >> n >> m;
std::cout << (1 << m) * ((n - m) * 100 + m * 1900) << std::endl;
} | ### Prompt
Create a solution in Cpp for the following problem:
Takahashi is now competing in a programming contest, but he received TLE in a problem where the answer is `YES` or `NO`.
When he checked the detailed status of the submission, there were N test cases in the problem, and the code received TLE in M of those cases.
Then, he rewrote the code to correctly solve each of those M cases with 1/2 probability in 1900 milliseconds, and correctly solve each of the other N-M cases without fail in 100 milliseconds.
Now, he goes through the following process:
* Submit the code.
* Wait until the code finishes execution on all the cases.
* If the code fails to correctly solve some of the M cases, submit it again.
* Repeat until the code correctly solve all the cases in one submission.
Let the expected value of the total execution time of the code be X milliseconds. Print X (as an integer).
Constraints
* All input values are integers.
* 1 \leq N \leq 100
* 1 \leq M \leq {\rm min}(N, 5)
Input
Input is given from Standard Input in the following format:
N M
Output
Print X, the expected value of the total execution time of the code, as an integer. It can be proved that, under the constraints in this problem, X is an integer not exceeding 10^9.
Examples
Input
1 1
Output
3800
Input
10 2
Output
18400
Input
100 5
Output
608000
### Response
```cpp
#include <iostream>
int main() {
int n, m;
std::cin >> n >> m;
std::cout << (1 << m) * ((n - m) * 100 + m * 1900) << std::endl;
}
``` |
#include <bits/stdc++.h>
using namespace std;
int main(){
int n,m,a;
cin>>n>>m;
a=(n-m)*100+m*1900;
for(int i=0;i<m;i++) a*=2;
cout<<a;
return 0;
}
| ### Prompt
Construct a cpp code solution to the problem outlined:
Takahashi is now competing in a programming contest, but he received TLE in a problem where the answer is `YES` or `NO`.
When he checked the detailed status of the submission, there were N test cases in the problem, and the code received TLE in M of those cases.
Then, he rewrote the code to correctly solve each of those M cases with 1/2 probability in 1900 milliseconds, and correctly solve each of the other N-M cases without fail in 100 milliseconds.
Now, he goes through the following process:
* Submit the code.
* Wait until the code finishes execution on all the cases.
* If the code fails to correctly solve some of the M cases, submit it again.
* Repeat until the code correctly solve all the cases in one submission.
Let the expected value of the total execution time of the code be X milliseconds. Print X (as an integer).
Constraints
* All input values are integers.
* 1 \leq N \leq 100
* 1 \leq M \leq {\rm min}(N, 5)
Input
Input is given from Standard Input in the following format:
N M
Output
Print X, the expected value of the total execution time of the code, as an integer. It can be proved that, under the constraints in this problem, X is an integer not exceeding 10^9.
Examples
Input
1 1
Output
3800
Input
10 2
Output
18400
Input
100 5
Output
608000
### Response
```cpp
#include <bits/stdc++.h>
using namespace std;
int main(){
int n,m,a;
cin>>n>>m;
a=(n-m)*100+m*1900;
for(int i=0;i<m;i++) a*=2;
cout<<a;
return 0;
}
``` |
#include <bits/stdc++.h>
using namespace std;
int main(void){
long N,M;
cin>>N>>M;
cout<<pow(2,M)*(100*(N-M)+1900*M)<<endl;
} | ### Prompt
Create a solution in cpp for the following problem:
Takahashi is now competing in a programming contest, but he received TLE in a problem where the answer is `YES` or `NO`.
When he checked the detailed status of the submission, there were N test cases in the problem, and the code received TLE in M of those cases.
Then, he rewrote the code to correctly solve each of those M cases with 1/2 probability in 1900 milliseconds, and correctly solve each of the other N-M cases without fail in 100 milliseconds.
Now, he goes through the following process:
* Submit the code.
* Wait until the code finishes execution on all the cases.
* If the code fails to correctly solve some of the M cases, submit it again.
* Repeat until the code correctly solve all the cases in one submission.
Let the expected value of the total execution time of the code be X milliseconds. Print X (as an integer).
Constraints
* All input values are integers.
* 1 \leq N \leq 100
* 1 \leq M \leq {\rm min}(N, 5)
Input
Input is given from Standard Input in the following format:
N M
Output
Print X, the expected value of the total execution time of the code, as an integer. It can be proved that, under the constraints in this problem, X is an integer not exceeding 10^9.
Examples
Input
1 1
Output
3800
Input
10 2
Output
18400
Input
100 5
Output
608000
### Response
```cpp
#include <bits/stdc++.h>
using namespace std;
int main(void){
long N,M;
cin>>N>>M;
cout<<pow(2,M)*(100*(N-M)+1900*M)<<endl;
}
``` |
#include <bits/stdc++.h>
using namespace std;
int main()
{
long long n,m;
cin>>n>>m;
cout<<(1900*m+100*(n-m))*(pow(2,m))<<endl;
return 0;
} | ### Prompt
Please provide a cpp coded solution to the problem described below:
Takahashi is now competing in a programming contest, but he received TLE in a problem where the answer is `YES` or `NO`.
When he checked the detailed status of the submission, there were N test cases in the problem, and the code received TLE in M of those cases.
Then, he rewrote the code to correctly solve each of those M cases with 1/2 probability in 1900 milliseconds, and correctly solve each of the other N-M cases without fail in 100 milliseconds.
Now, he goes through the following process:
* Submit the code.
* Wait until the code finishes execution on all the cases.
* If the code fails to correctly solve some of the M cases, submit it again.
* Repeat until the code correctly solve all the cases in one submission.
Let the expected value of the total execution time of the code be X milliseconds. Print X (as an integer).
Constraints
* All input values are integers.
* 1 \leq N \leq 100
* 1 \leq M \leq {\rm min}(N, 5)
Input
Input is given from Standard Input in the following format:
N M
Output
Print X, the expected value of the total execution time of the code, as an integer. It can be proved that, under the constraints in this problem, X is an integer not exceeding 10^9.
Examples
Input
1 1
Output
3800
Input
10 2
Output
18400
Input
100 5
Output
608000
### Response
```cpp
#include <bits/stdc++.h>
using namespace std;
int main()
{
long long n,m;
cin>>n>>m;
cout<<(1900*m+100*(n-m))*(pow(2,m))<<endl;
return 0;
}
``` |
#include <bits/stdc++.h>
using namespace std;
int main()
{
int N, M;
cin >> N >> M;
cout << (100 * (N - M) + 1900 * M) * pow(2, M) << endl;
}
| ### Prompt
Your task is to create a CPP solution to the following problem:
Takahashi is now competing in a programming contest, but he received TLE in a problem where the answer is `YES` or `NO`.
When he checked the detailed status of the submission, there were N test cases in the problem, and the code received TLE in M of those cases.
Then, he rewrote the code to correctly solve each of those M cases with 1/2 probability in 1900 milliseconds, and correctly solve each of the other N-M cases without fail in 100 milliseconds.
Now, he goes through the following process:
* Submit the code.
* Wait until the code finishes execution on all the cases.
* If the code fails to correctly solve some of the M cases, submit it again.
* Repeat until the code correctly solve all the cases in one submission.
Let the expected value of the total execution time of the code be X milliseconds. Print X (as an integer).
Constraints
* All input values are integers.
* 1 \leq N \leq 100
* 1 \leq M \leq {\rm min}(N, 5)
Input
Input is given from Standard Input in the following format:
N M
Output
Print X, the expected value of the total execution time of the code, as an integer. It can be proved that, under the constraints in this problem, X is an integer not exceeding 10^9.
Examples
Input
1 1
Output
3800
Input
10 2
Output
18400
Input
100 5
Output
608000
### Response
```cpp
#include <bits/stdc++.h>
using namespace std;
int main()
{
int N, M;
cin >> N >> M;
cout << (100 * (N - M) + 1900 * M) * pow(2, M) << endl;
}
``` |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.