output
stringlengths
52
181k
instruction
stringlengths
296
182k
#include <iostream> using namespace std; int main(void){ int a,b,c,cnt=1; cin >> a>>b>>c; if(a!=b) cnt++; if(a!=c&&b!=c) cnt++; cout<<cnt; }
### Prompt Please create a solution in CPP to the following problem: AtCoDeer the deer recently bought three paint cans. The color of the one he bought two days ago is a, the color of the one he bought yesterday is b, and the color of the one he bought today is c. Here, the color of each paint can is represented by a...
#include <bits/stdc++.h> using namespace std; int main(){ set<int> s; for(int i=0;i<3;i++){ int x; cin >> x; s.insert(x); } cout << s.size() << endl; return 0; }
### Prompt Please provide a cpp coded solution to the problem described below: AtCoDeer the deer recently bought three paint cans. The color of the one he bought two days ago is a, the color of the one he bought yesterday is b, and the color of the one he bought today is c. Here, the color of each paint can is repres...
#include<iostream> using namespace std; int main(){ int a,b,c;cin>>a>>b>>c; int ans=3; if(a==b&&b==c)ans=1; else if(a==b||b==c||c==a) ans=2; cout<<ans<<endl; return 0; }
### Prompt Your challenge is to write a cpp solution to the following problem: AtCoDeer the deer recently bought three paint cans. The color of the one he bought two days ago is a, the color of the one he bought yesterday is b, and the color of the one he bought today is c. Here, the color of each paint can is repres...
#include<stdio.h> int main() { int a,b,c,n; scanf("%d %d %d",&a,&b,&c); if(a!=b&&a!=c&&b!=c) printf("3"); else if(a==b&&b==c&&a==c) printf("1"); else printf("2"); return 0; }
### Prompt Create a solution in cpp for the following problem: AtCoDeer the deer recently bought three paint cans. The color of the one he bought two days ago is a, the color of the one he bought yesterday is b, and the color of the one he bought today is c. Here, the color of each paint can is represented by an inte...
#include <bits/stdc++.h> using namespace std; int main() { set<int> c; for(int i = 0; i < 3; i++) { int t; scanf("%d", &t); c.insert(t); } printf("%d\n", c.size()); }
### Prompt Please provide a CPP coded solution to the problem described below: AtCoDeer the deer recently bought three paint cans. The color of the one he bought two days ago is a, the color of the one he bought yesterday is b, and the color of the one he bought today is c. Here, the color of each paint can is repres...
#include<cstdio> int main() { int a,b,c; scanf("%d %d %d",&a,&b,&c); if(a!=b&&b!=c&&c!=a) printf("3"); else if(a==b&&b==c&&c==a) printf("1"); else printf("2"); return 0; }
### Prompt Please create a solution in Cpp to the following problem: AtCoDeer the deer recently bought three paint cans. The color of the one he bought two days ago is a, the color of the one he bought yesterday is b, and the color of the one he bought today is c. Here, the color of each paint can is represented by a...
#include<iostream> using namespace std; int main(){ int a,b,c; cin>>a>>b>>c; int count=1; if(b!=a)count++; if((c!=a) && (c!=b))count++; cout<<count<<endl; return 0; }
### Prompt Please create a solution in CPP to the following problem: AtCoDeer the deer recently bought three paint cans. The color of the one he bought two days ago is a, the color of the one he bought yesterday is b, and the color of the one he bought today is c. Here, the color of each paint can is represented by a...
#include <iostream> using namespace std; int main(void){ int a,b,c; cin>>a>>b>>c; if (a==b && b==c){cout<<1;} else if (a==b || b==c || a==c){cout<<2;} else cout<<3; }
### Prompt Your task is to create a CPP solution to the following problem: AtCoDeer the deer recently bought three paint cans. The color of the one he bought two days ago is a, the color of the one he bought yesterday is b, and the color of the one he bought today is c. Here, the color of each paint can is represente...
#include <bits/stdc++.h> using namespace std; #define REP(i,n) for(int(i)=0;i<(n);i++) int main(){ int a; map<int,int> m; REP(i,3){ cin>>a; m[a]++; } cout<<m.size(); }
### Prompt Your challenge is to write a Cpp solution to the following problem: AtCoDeer the deer recently bought three paint cans. The color of the one he bought two days ago is a, the color of the one he bought yesterday is b, and the color of the one he bought today is c. Here, the color of each paint can is repres...
#include <iostream> #include <map> using namespace std; int main(){ int a,b,c,kind=0; cin>>a>>b>>c; map<int,int> m; m[a]=1; m[b]=1; m[c]=1; cout << m.size()<<endl; return 0; }
### Prompt Create a solution in cpp for the following problem: AtCoDeer the deer recently bought three paint cans. The color of the one he bought two days ago is a, the color of the one he bought yesterday is b, and the color of the one he bought today is c. Here, the color of each paint can is represented by an inte...
#import"bits/stdc++.h" int main(){int a,b,c;std::cin>>a>>b>>c;std::cout<<(3-std::min((a==b)+(a==c)+(b==c),2));}
### Prompt Construct a CPP code solution to the problem outlined: AtCoDeer the deer recently bought three paint cans. The color of the one he bought two days ago is a, the color of the one he bought yesterday is b, and the color of the one he bought today is c. Here, the color of each paint can is represented by an i...
#include <iostream> int main(){int a,b,c;std::cin>>a>>b>>c;std::cout<<((a!=b)+(b!=c)+(c!=a)+1)/2+1;}
### Prompt Generate a CPP solution to the following problem: AtCoDeer the deer recently bought three paint cans. The color of the one he bought two days ago is a, the color of the one he bought yesterday is b, and the color of the one he bought today is c. Here, the color of each paint can is represented by an intege...
#include<bits//stdc++.h>> using namespace std; int main(){ set<int> st;int n; for(int i = 0; i <3;i++){ cin >> n;st.insert(n); }cout <<st.size()<<endl; }
### Prompt Your task is to create a CPP solution to the following problem: AtCoDeer the deer recently bought three paint cans. The color of the one he bought two days ago is a, the color of the one he bought yesterday is b, and the color of the one he bought today is c. Here, the color of each paint can is represente...
#include <bits/stdc++.h> using namespace std; int main() { int a,b,c; cin >> a >> b >> c; cout << (a==b && b==c ? 1 : (a!=b && b!=c && c!=a? 3 : 2)) << endl; }
### Prompt Please formulate a Cpp solution to the following problem: AtCoDeer the deer recently bought three paint cans. The color of the one he bought two days ago is a, the color of the one he bought yesterday is b, and the color of the one he bought today is c. Here, the color of each paint can is represented by a...
#include<iostream> #include<cstdio> using namespace std; int a,b,c; int main() { scanf("%d%d%d",&a,&b,&c); printf("%d",3-min((a==b)+(a==c)+(b==c),2)); return 0; }
### Prompt Please provide a CPP coded solution to the problem described below: AtCoDeer the deer recently bought three paint cans. The color of the one he bought two days ago is a, the color of the one he bought yesterday is b, and the color of the one he bought today is c. Here, the color of each paint can is repres...
#include <bits/stdc++.h> using namespace std; int main(){ set<int> s; for(int i=0;i<3;i++){ int a; cin>>a; s.insert(a); } cout<<s.size()<<endl; }
### Prompt Construct a Cpp code solution to the problem outlined: AtCoDeer the deer recently bought three paint cans. The color of the one he bought two days ago is a, the color of the one he bought yesterday is b, and the color of the one he bought today is c. Here, the color of each paint can is represented by an i...
#include <iostream> using namespace std; int main(){ int a,b,h; cin>>a>>b>>h; if(a==b&&b==h) cout<<1; else if(a==b||b==h||h==a) cout<<2; else cout<<3; }
### Prompt Your challenge is to write a Cpp solution to the following problem: AtCoDeer the deer recently bought three paint cans. The color of the one he bought two days ago is a, the color of the one he bought yesterday is b, and the color of the one he bought today is c. Here, the color of each paint can is repres...
#include<bits/stdc++.h> using namespace std; int main(){ int a, b, c; scanf("%d%d%d", &a, &b, &c); printf("%d", (a == b ? a == c ? 1 : 2 : a == c ? 2 : b == c ? 2 : 3)); }
### Prompt Please formulate a Cpp solution to the following problem: AtCoDeer the deer recently bought three paint cans. The color of the one he bought two days ago is a, the color of the one he bought yesterday is b, and the color of the one he bought today is c. Here, the color of each paint can is represented by a...
#include <iostream> #include <set> using namespace std; int main (){ set<int> ans; for (int i = 0; i < 3; i++) { int sub; cin >> sub; ans.insert(sub); } cout <<ans.size() << endl; }
### Prompt Please formulate a CPP solution to the following problem: AtCoDeer the deer recently bought three paint cans. The color of the one he bought two days ago is a, the color of the one he bought yesterday is b, and the color of the one he bought today is c. Here, the color of each paint can is represented by a...
#include <bits/stdc++.h> using namespace std; int a[3]; int main(){ for(int i=0;i<3;i++)scanf("%d",a+i);sort(a,a+3);printf("%d\n",unique(a,a+3)-a); }
### Prompt Create a solution in Cpp for the following problem: AtCoDeer the deer recently bought three paint cans. The color of the one he bought two days ago is a, the color of the one he bought yesterday is b, and the color of the one he bought today is c. Here, the color of each paint can is represented by an inte...
#include<cstdio> int main() { int a,b,c,ans; scanf("%d%d%d",&a,&b,&c); if(a==b&&b==c) ans=1; else if(a==b||a==c||b==c) ans=2; else ans=3; printf("%d\n",ans); return 0; }
### Prompt Please formulate a Cpp solution to the following problem: AtCoDeer the deer recently bought three paint cans. The color of the one he bought two days ago is a, the color of the one he bought yesterday is b, and the color of the one he bought today is c. Here, the color of each paint can is represented by a...
#include<bits/stdc++.h> using namespace std; int main() { set<int> n; for(int i = 0; i < 3; i++) { int a; cin>>a; n.insert(a); } cout<<n.size()<<"\n"; }
### Prompt Generate a Cpp solution to the following problem: AtCoDeer the deer recently bought three paint cans. The color of the one he bought two days ago is a, the color of the one he bought yesterday is b, and the color of the one he bought today is c. Here, the color of each paint can is represented by an intege...
#include <bits/stdc++.h> int main() { int a, b, c; std::cin >> a >> b >> c; std::set<int> s = {a, b, c}; std::cout << s.size() << std::endl; return 0; }
### Prompt In cpp, your task is to solve the following problem: AtCoDeer the deer recently bought three paint cans. The color of the one he bought two days ago is a, the color of the one he bought yesterday is b, and the color of the one he bought today is c. Here, the color of each paint can is represented by an int...
#include<bits/stdc++.h> using namespace std; int main(){ set<int>list; for(int i=0;i<3;i++){ int N; cin>>N; list.insert(N); } cout<<list.size()<<endl; }
### Prompt Generate a Cpp solution to the following problem: AtCoDeer the deer recently bought three paint cans. The color of the one he bought two days ago is a, the color of the one he bought yesterday is b, and the color of the one he bought today is c. Here, the color of each paint can is represented by an intege...
#include <iostream> #include <set> using namespace std; int main() { int a, b, c; cin >> a >> b >> c; set<int> res{a, b, c}; cout << res.size() << endl; return 0; }
### Prompt Construct a CPP code solution to the problem outlined: AtCoDeer the deer recently bought three paint cans. The color of the one he bought two days ago is a, the color of the one he bought yesterday is b, and the color of the one he bought today is c. Here, the color of each paint can is represented by an i...
#include <iostream> using namespace std; int main(void){ int a,b,c; cin>>a>>b>>c; if(a==b&&b==c) cout<<1; else if(a==b||b==c||a==c) cout<<2; else cout<<3; return 0; }
### Prompt Please provide a Cpp coded solution to the problem described below: AtCoDeer the deer recently bought three paint cans. The color of the one he bought two days ago is a, the color of the one he bought yesterday is b, and the color of the one he bought today is c. Here, the color of each paint can is repres...
#include<iostream> using namespace std; int main(){ int a,b,c; cin>>a>>b>>c; if(a==b && a==c)cout<<1; else if(a==b || a==c || b==c)cout<<2; else cout<<3; return 0; }
### Prompt Your challenge is to write a CPP solution to the following problem: AtCoDeer the deer recently bought three paint cans. The color of the one he bought two days ago is a, the color of the one he bought yesterday is b, and the color of the one he bought today is c. Here, the color of each paint can is repres...
#include<bits/stdc++.h> using namespace std; int a[3],cnt=3; int main(){ cin>>a[0]>>a[1]>>a[2];sort(a,a+3); if(a[0]==a[1])cnt--; if(a[1]==a[2])cnt--; cout<<cnt<<endl; return 0; }
### Prompt Generate a cpp solution to the following problem: AtCoDeer the deer recently bought three paint cans. The color of the one he bought two days ago is a, the color of the one he bought yesterday is b, and the color of the one he bought today is c. Here, the color of each paint can is represented by an intege...
#include<bits/stdc++.h> using namespace std; set<int>se; int main(){ int a,b,c;cin>>a>>b>>c; se.insert(a);se.insert(b);se.insert(c); printf("%d\n",se.size()); }
### Prompt Your challenge is to write a cpp solution to the following problem: AtCoDeer the deer recently bought three paint cans. The color of the one he bought two days ago is a, the color of the one he bought yesterday is b, and the color of the one he bought today is c. Here, the color of each paint can is repres...
#include<iostream> #include<map> using namespace std; int main(){ map<int,int> m; for(int i = 0;i < 3;i++){ int a; cin >> a; m[a]++; } cout << m.size() << endl; return 0; }
### Prompt Please formulate a cpp solution to the following problem: AtCoDeer the deer recently bought three paint cans. The color of the one he bought two days ago is a, the color of the one he bought yesterday is b, and the color of the one he bought today is c. Here, the color of each paint can is represented by a...
#include "bits/stdc++.h" using namespace std; int main(){ int a,b,c,ans=3; cin>>a;cin>>b;if(a==b)--ans; cin>>c;if(a==c||b==c)--ans; cout<<ans; }
### Prompt Please provide a Cpp coded solution to the problem described below: AtCoDeer the deer recently bought three paint cans. The color of the one he bought two days ago is a, the color of the one he bought yesterday is b, and the color of the one he bought today is c. Here, the color of each paint can is repres...
#include<iostream> using namespace std; int main(void) { int a,b,c; cin >> a >> b >> c; cout << (a==b ? (b==c ? 1:2):(a==c ? 2:(b==c ? 2:3))) << endl; }
### Prompt Generate a CPP solution to the following problem: AtCoDeer the deer recently bought three paint cans. The color of the one he bought two days ago is a, the color of the one he bought yesterday is b, and the color of the one he bought today is c. Here, the color of each paint can is represented by an intege...
#include <iostream> #include <set> using namespace std; int main(){ set<int> s; for(int i = 0, t; i < 3; i++) cin >> t, s.insert(t); cout << s.size() << endl; return 0; }
### Prompt Your task is to create a Cpp solution to the following problem: AtCoDeer the deer recently bought three paint cans. The color of the one he bought two days ago is a, the color of the one he bought yesterday is b, and the color of the one he bought today is c. Here, the color of each paint can is represente...
#include<bits/stdc++.h> using namespace std; set<int> s; int main(){ for(int i=1;i<=3;i++){ int x; cin>>x; s.insert(x); } cout<<s.size(); return 0; }
### Prompt Please formulate a CPP solution to the following problem: AtCoDeer the deer recently bought three paint cans. The color of the one he bought two days ago is a, the color of the one he bought yesterday is b, and the color of the one he bought today is c. Here, the color of each paint can is represented by a...
#include<bits/stdc++.h> using namespace std; int main() { unordered_map<int,int> hm; int a,b,c; cin>>a>>b>>c; hm[a]++; hm[b]++; hm[c]++; cout<<hm.size(); return 0; }
### Prompt Please create a solution in cpp to the following problem: AtCoDeer the deer recently bought three paint cans. The color of the one he bought two days ago is a, the color of the one he bought yesterday is b, and the color of the one he bought today is c. Here, the color of each paint can is represented by a...
#include<bits/stdc++.h> using namespace std; set<int> st; int main() { for(int i=0;i<3;i++) { int x; cin>>x; st.insert(x); } cout<<st.size()<<endl; return 0; }
### Prompt Please create a solution in Cpp to the following problem: AtCoDeer the deer recently bought three paint cans. The color of the one he bought two days ago is a, the color of the one he bought yesterday is b, and the color of the one he bought today is c. Here, the color of each paint can is represented by a...
#include <bits/stdc++.h> using namespace std; int a; set<int> s; int main(){ for(int i = 0; i < 3; i++){ cin >> a; s.insert(a); } cout << s.size(); }
### Prompt Please create a solution in cpp to the following problem: AtCoDeer the deer recently bought three paint cans. The color of the one he bought two days ago is a, the color of the one he bought yesterday is b, and the color of the one he bought today is c. Here, the color of each paint can is represented by a...
#include<bits/stdc++.h> using namespace std; int main(){ int a, b, c; cin >> a >> b >> c; set<int> A; A = {a, b, c}; cout << A.size() << endl; }
### Prompt Please formulate a CPP solution to the following problem: AtCoDeer the deer recently bought three paint cans. The color of the one he bought two days ago is a, the color of the one he bought yesterday is b, and the color of the one he bought today is c. Here, the color of each paint can is represented by a...
#include<bits/stdc++.h> using namespace std; int main(){ int a,b,c; cin>>a>>b>>c; cout<<3-(a==b)-(b==c)-(c==a)+(a==b&&b==c)<<endl; return 0; }
### Prompt Please provide a cpp coded solution to the problem described below: AtCoDeer the deer recently bought three paint cans. The color of the one he bought two days ago is a, the color of the one he bought yesterday is b, and the color of the one he bought today is c. Here, the color of each paint can is repres...
#include<iostream> using namespace std; int main() { int a,b,c; cin>>a>>b>>c; if(a!=b && a!=c && b!=c) cout<<3; else if(a==b && a==c) cout<<1; else cout<<2; }
### Prompt Please create a solution in CPP to the following problem: AtCoDeer the deer recently bought three paint cans. The color of the one he bought two days ago is a, the color of the one he bought yesterday is b, and the color of the one he bought today is c. Here, the color of each paint can is represented by a...
#include<iostream> using namespace std; int main(){ int a,b,c; cin>>a>>b>>c; int ans=1; if(a!=b) ans+=1; if(a!=c&&b!=c) ans+=1; cout<<ans<<endl; }
### Prompt Your task is to create a cpp solution to the following problem: AtCoDeer the deer recently bought three paint cans. The color of the one he bought two days ago is a, the color of the one he bought yesterday is b, and the color of the one he bought today is c. Here, the color of each paint can is represente...
#include<iostream> using namespace std; int main(){ int a,b,c,i; i=1; cin >> a >> b >> c; if(b!=a) i++; if(c!=a&&c!=b) i++; cout << i << endl; }
### Prompt Create a solution in CPP for the following problem: AtCoDeer the deer recently bought three paint cans. The color of the one he bought two days ago is a, the color of the one he bought yesterday is b, and the color of the one he bought today is c. Here, the color of each paint can is represented by an inte...
#include<iostream> using namespace std; int main(void){ int a,b,c,n(1); cin>>a>>b>>c; if(b!=a)n++; if(c!=b && c!=a)n++; cout<<n<<endl; return 0; }
### Prompt In cpp, your task is to solve the following problem: AtCoDeer the deer recently bought three paint cans. The color of the one he bought two days ago is a, the color of the one he bought yesterday is b, and the color of the one he bought today is c. Here, the color of each paint can is represented by an int...
#include<bits/stdc++.h> using namespace std; set<int> s; int a,b,c; int main(){ cin >> a >> b >> c; s.insert(a); s.insert(b); s.insert(c); printf("%d",s.size()); }
### Prompt Your task is to create a cpp solution to the following problem: AtCoDeer the deer recently bought three paint cans. The color of the one he bought two days ago is a, the color of the one he bought yesterday is b, and the color of the one he bought today is c. Here, the color of each paint can is represente...
#include<bits/stdc++.h> using namespace std; int main(void) { int a, b, c; cin >> a >> b >> c; set<int> s{a, b, c}; cout << s.size(); }
### Prompt Construct a cpp code solution to the problem outlined: AtCoDeer the deer recently bought three paint cans. The color of the one he bought two days ago is a, the color of the one he bought yesterday is b, and the color of the one he bought today is c. Here, the color of each paint can is represented by an i...
#include <bits/stdc++.h> using namespace std; set<int> s; int a,b,c; int main() { cin>>a>>b>>c; s.insert(a); s.insert(b); s.insert(c); cout<<s.size(); return 0; }
### Prompt Please create a solution in cpp to the following problem: AtCoDeer the deer recently bought three paint cans. The color of the one he bought two days ago is a, the color of the one he bought yesterday is b, and the color of the one he bought today is c. Here, the color of each paint can is represented by a...
#include<bits/stdc++.h> using namespace std; int a,b,c; int main() { cin>>a>>b>>c; if(a==b&&b==c)cout<<1<<endl; else if(a==b||b==c||a==c)cout<<2<<endl; else cout<<3<<endl; }
### Prompt Construct a CPP code solution to the problem outlined: AtCoDeer the deer recently bought three paint cans. The color of the one he bought two days ago is a, the color of the one he bought yesterday is b, and the color of the one he bought today is c. Here, the color of each paint can is represented by an i...
#include<iostream> using namespace std; bool use[110]; int main(){ int i=3,x,ans=0; while(i>0){ cin>>x;if(!use[x])++ans; use[x]=true;--i; } cout<<ans<<endl; return 0; }
### Prompt Construct a cpp code solution to the problem outlined: AtCoDeer the deer recently bought three paint cans. The color of the one he bought two days ago is a, the color of the one he bought yesterday is b, and the color of the one he bought today is c. Here, the color of each paint can is represented by an i...
#include<iostream> using namespace std; int main(){ int a,b,c; cin>>a>>b>>c; cout<<(3-(a==b)-(b==c)-(c==a)+(a==b&&b==c))<<endl; return 0; }
### Prompt In cpp, your task is to solve the following problem: AtCoDeer the deer recently bought three paint cans. The color of the one he bought two days ago is a, the color of the one he bought yesterday is b, and the color of the one he bought today is c. Here, the color of each paint can is represented by an int...
#include <iostream> #include <map> using namespace std; int main(){ map<int,int> s; int a; for(int i=0;i<3;i++){ cin>>a; s[a]=1; } cout<<s.size(); }
### Prompt Generate a cpp solution to the following problem: AtCoDeer the deer recently bought three paint cans. The color of the one he bought two days ago is a, the color of the one he bought yesterday is b, and the color of the one he bought today is c. Here, the color of each paint can is represented by an intege...
#include <bits/stdc++.h> using namespace std; int main() { int a,b,c; cin>>a>>b>>c; printf(a==b && b==c && c==a?"1":c==a || a==b || b==c?"2":"3"); return 0; }
### Prompt Please create a solution in Cpp to the following problem: AtCoDeer the deer recently bought three paint cans. The color of the one he bought two days ago is a, the color of the one he bought yesterday is b, and the color of the one he bought today is c. Here, the color of each paint can is represented by a...
#include <iostream> using namespace std; int main() { int a, b, c; cin >> a >> b >> c; int x = (a != b) + (b != c) + (c != a) + (a == b && b == c); cout << x; }
### Prompt Generate a Cpp solution to the following problem: AtCoDeer the deer recently bought three paint cans. The color of the one he bought two days ago is a, the color of the one he bought yesterday is b, and the color of the one he bought today is c. Here, the color of each paint can is represented by an intege...
#include<bits/stdc++.h> using namespace std; int main(){ int a,b,c; cin>>a>>b>>c; int ans=1; if(b!=a) ans++; if(c!=a && c!=b) ans++; cout << ans <<endl; }
### Prompt Create a solution in cpp for the following problem: AtCoDeer the deer recently bought three paint cans. The color of the one he bought two days ago is a, the color of the one he bought yesterday is b, and the color of the one he bought today is c. Here, the color of each paint can is represented by an inte...
#include <bits/stdc++.h> #define rep(i,n) for(int i=0;i<(n);i++) using namespace std; int main(){ int a,b,c; cin>>a>>b>>c; cout<<set<int>({a,b,c}).size()<<'\n'; return 0; }
### Prompt Please provide a CPP coded solution to the problem described below: AtCoDeer the deer recently bought three paint cans. The color of the one he bought two days ago is a, the color of the one he bought yesterday is b, and the color of the one he bought today is c. Here, the color of each paint can is repres...
#include<iostream> using namespace std; int main(){ int a,b,c,ans=3; cin>>a>>b>>c; if(a==b)ans--; if(b==c)ans--; if(c==a)ans--; if(a==b&&b==c)ans++; cout<<ans<<endl; }
### Prompt Develop a solution in Cpp to the problem described below: AtCoDeer the deer recently bought three paint cans. The color of the one he bought two days ago is a, the color of the one he bought yesterday is b, and the color of the one he bought today is c. Here, the color of each paint can is represented by a...
#include<bits/stdc++.h> using namespace std; int main() { int a,b,c; set<int>s; cin>>a>>b>>c; s.insert(a); s.insert(b); s.insert(c); cout<<s.size()<<endl; }
### Prompt Generate a cpp solution to the following problem: AtCoDeer the deer recently bought three paint cans. The color of the one he bought two days ago is a, the color of the one he bought yesterday is b, and the color of the one he bought today is c. Here, the color of each paint can is represented by an intege...
#include<bits/stdc++.h> using namespace std; int main() { int a, b, c, ct = 1; cin >> a >> b >> c; if(a != b) ct++; if(a != c && b != c) ct++; cout << ct << endl; }
### Prompt Your task is to create a Cpp solution to the following problem: AtCoDeer the deer recently bought three paint cans. The color of the one he bought two days ago is a, the color of the one he bought yesterday is b, and the color of the one he bought today is c. Here, the color of each paint can is represente...
#include <bits/stdc++.h> using namespace std; int main() { set<int> s; for ( int i=0; i<3; i++ ) { int a; cin >> a; s.insert(a); } cout << s.size(); return 0; }
### Prompt Develop a solution in cpp to the problem described below: AtCoDeer the deer recently bought three paint cans. The color of the one he bought two days ago is a, the color of the one he bought yesterday is b, and the color of the one he bought today is c. Here, the color of each paint can is represented by a...
#include <iostream> using namespace std; int main() { int a, b, c; cin >> a >> b >> c; cout << (3 - (a == b || b == c || c == a) - (a == b && b == c)) << endl; return 0; }
### Prompt Please formulate a cpp solution to the following problem: AtCoDeer the deer recently bought three paint cans. The color of the one he bought two days ago is a, the color of the one he bought yesterday is b, and the color of the one he bought today is c. Here, the color of each paint can is represented by a...
#include <iostream> using namespace std; int a, b, c, s=3; int main() { cin>>a>>b>>c; if(a==b && b==c) s=1; else if(a==b || b==c || c==a) s=2; cout<<s; return 0; }
### Prompt Generate a Cpp solution to the following problem: AtCoDeer the deer recently bought three paint cans. The color of the one he bought two days ago is a, the color of the one he bought yesterday is b, and the color of the one he bought today is c. Here, the color of each paint can is represented by an intege...
#include<bits/stdc++.h> using namespace std; int a; set<int>s; int main(){ for(int i=0;i<3;i++){cin>>a;s.insert(a);} cout<<s.size()<<endl; }
### Prompt In CPP, your task is to solve the following problem: AtCoDeer the deer recently bought three paint cans. The color of the one he bought two days ago is a, the color of the one he bought yesterday is b, and the color of the one he bought today is c. Here, the color of each paint can is represented by an int...
#include <iostream> #include <set> using namespace std; int main () { set<int> s; for (int i=0;i<3;i++) { int a; cin >> a; s.insert(a); } cout << s.size() << endl; }
### Prompt Generate a cpp solution to the following problem: AtCoDeer the deer recently bought three paint cans. The color of the one he bought two days ago is a, the color of the one he bought yesterday is b, and the color of the one he bought today is c. Here, the color of each paint can is represented by an intege...
#include "bits/stdc++.h" using namespace std; int main() { int a,b,c,m=1; cin >> a >> b >> c; if(a!=b) m++; if(a!=c&&b!=c) m++; cout << m << endl; return 0; }
### Prompt Create a solution in CPP for the following problem: AtCoDeer the deer recently bought three paint cans. The color of the one he bought two days ago is a, the color of the one he bought yesterday is b, and the color of the one he bought today is c. Here, the color of each paint can is represented by an inte...
#include <iostream> #include <set> using namespace std; int main(){ int a, b, c; cin >> a >> b >> c; set<int> st {a, b, c}; cout << st.size() << endl; return 0; }
### Prompt Please provide a CPP coded solution to the problem described below: AtCoDeer the deer recently bought three paint cans. The color of the one he bought two days ago is a, the color of the one he bought yesterday is b, and the color of the one he bought today is c. Here, the color of each paint can is repres...
#include "bits/stdc++.h" using namespace std; int main() { set<int>S; for (int i = 0;i<3;++i) { int num; cin >> num; S.insert(num); } cout << S.size()<<endl; return 0; }
### Prompt Generate a Cpp solution to the following problem: AtCoDeer the deer recently bought three paint cans. The color of the one he bought two days ago is a, the color of the one he bought yesterday is b, and the color of the one he bought today is c. Here, the color of each paint can is represented by an intege...
#include"bits/stdc++.h" using namespace std; int main() { set<int> a; int x; for (int i = 0; i < 3; i++) { cin >> x; a.insert(x); } cout << a.size() << endl; }
### Prompt Please create a solution in Cpp to the following problem: AtCoDeer the deer recently bought three paint cans. The color of the one he bought two days ago is a, the color of the one he bought yesterday is b, and the color of the one he bought today is c. Here, the color of each paint can is represented by a...
#include<iostream> int main(){int A,B,C;std::cin>>A>>B>>C;std::cout<<(A==B&&A==C?1:A==B||B==C||A==C?2:3);}
### Prompt Your task is to create a CPP solution to the following problem: AtCoDeer the deer recently bought three paint cans. The color of the one he bought two days ago is a, the color of the one he bought yesterday is b, and the color of the one he bought today is c. Here, the color of each paint can is represente...
#include<bits/stdc++.h> using namespace std; int main(){ map<int,int> m; int a,b,c; cin>>a>>b>>c; m[a]++; m[b]++; m[c]++; cout<<m.size()<<endl; }
### Prompt Please create a solution in cpp to the following problem: AtCoDeer the deer recently bought three paint cans. The color of the one he bought two days ago is a, the color of the one he bought yesterday is b, and the color of the one he bought today is c. Here, the color of each paint can is represented by a...
#include<iostream> using namespace std; int main() { int a,b,c,ans=1; cin >> a; cin >> b; if(b != a) ans++; cin >> c; if(c != a && c != b) ans++; cout << ans; return 0; }
### Prompt Create a solution in Cpp for the following problem: AtCoDeer the deer recently bought three paint cans. The color of the one he bought two days ago is a, the color of the one he bought yesterday is b, and the color of the one he bought today is c. Here, the color of each paint can is represented by an inte...
#include<iostream> using namespace std; int main() { int a, b, c; cin >> a >> b >> c; cout << (a != b) + (a != c) + (b != c) + (a == b && b == c) << endl; }
### Prompt Your task is to create a Cpp solution to the following problem: AtCoDeer the deer recently bought three paint cans. The color of the one he bought two days ago is a, the color of the one he bought yesterday is b, and the color of the one he bought today is c. Here, the color of each paint can is represente...
#include<iostream> using namespace std; int main(){ int a,b,c; cin>>a>>b>>c; if(a==b&&b==c)cout<<1<<endl; else if(a==b||b==c||a==c)cout<<2<<endl; else cout<<3<<endl; }
### Prompt Create a solution in cpp for the following problem: AtCoDeer the deer recently bought three paint cans. The color of the one he bought two days ago is a, the color of the one he bought yesterday is b, and the color of the one he bought today is c. Here, the color of each paint can is represented by an inte...
#include<stdio.h> int main(){ int a,b,c,d=1; scanf("%d",&a); scanf("%d",&b); if(a!=b)d++; scanf("%d",&c); if(a!=c&&b!=c)d++; printf("%d\n",d); }
### Prompt Develop a solution in cpp to the problem described below: AtCoDeer the deer recently bought three paint cans. The color of the one he bought two days ago is a, the color of the one he bought yesterday is b, and the color of the one he bought today is c. Here, the color of each paint can is represented by a...
#include <bits/stdc++.h> using namespace std; int main(){ int a,b,c; cin>>a>>b>>c; cout<<(a==b&&a==c?1:a!=b&&a!=c&&b!=c?3:2); }
### Prompt Please create a solution in Cpp to the following problem: AtCoDeer the deer recently bought three paint cans. The color of the one he bought two days ago is a, the color of the one he bought yesterday is b, and the color of the one he bought today is c. Here, the color of each paint can is represented by a...
#include<bits/stdc++.h> using namespace std; set<int> ada; int main(){ for(int i=0;i<3;i++){ int x; cin >> x; ada.insert(x); } cout << ada.size() << endl; return 0; }
### Prompt Generate a cpp solution to the following problem: AtCoDeer the deer recently bought three paint cans. The color of the one he bought two days ago is a, the color of the one he bought yesterday is b, and the color of the one he bought today is c. Here, the color of each paint can is represented by an intege...
#include <bits/stdc++.h> using namespace std; int main() { int n,i; set<int>s; for(i=0;i<3;i++) { cin>>n;s.insert(n); }cout<<s.size(); }
### Prompt In CPP, your task is to solve the following problem: AtCoDeer the deer recently bought three paint cans. The color of the one he bought two days ago is a, the color of the one he bought yesterday is b, and the color of the one he bought today is c. Here, the color of each paint can is represented by an int...
#include <iostream> using namespace std; int main(){ int a,b,c; cin >> a >> b >> c; if(a==b && b==c){cout <<1;} else if(a==b||b==c||c==a){cout<<2;} else{cout<<3;} }
### Prompt Your challenge is to write a CPP solution to the following problem: AtCoDeer the deer recently bought three paint cans. The color of the one he bought two days ago is a, the color of the one he bought yesterday is b, and the color of the one he bought today is c. Here, the color of each paint can is repres...
#include <bits/stdc++.h> using namespace std; int main(){ int a, b, c; cin >> a >> b >> c; set <int> s; s.insert(a); s.insert(b); s.insert(c); cout << s.size(); return 0; }
### Prompt Please formulate a Cpp solution to the following problem: AtCoDeer the deer recently bought three paint cans. The color of the one he bought two days ago is a, the color of the one he bought yesterday is b, and the color of the one he bought today is c. Here, the color of each paint can is represented by a...
#include<iostream> using namespace std; int main(){ int a,b,c; cin>>a>>b>>c; int count=1; if(a!=b) count++; if(a!=c&&b!=c) count++; cout<<count; }
### Prompt Please formulate a CPP solution to the following problem: AtCoDeer the deer recently bought three paint cans. The color of the one he bought two days ago is a, the color of the one he bought yesterday is b, and the color of the one he bought today is c. Here, the color of each paint can is represented by a...
#include<bits/stdc++.h> using namespace std; int main(){ int a,b,c;cin>>a>>b>>c; if(a==b&b==c&c==a)cout<<1; else if(a!=b&b!=c&c!=a)cout<<3; else cout<<2;}
### Prompt Please create a solution in Cpp to the following problem: AtCoDeer the deer recently bought three paint cans. The color of the one he bought two days ago is a, the color of the one he bought yesterday is b, and the color of the one he bought today is c. Here, the color of each paint can is represented by a...
#include <bits/stdc++.h> using namespace std; int main() { int a,b,c; cin >> a >> b >> c; set<int> junjo={a,b,c}; cout << junjo.size(); }
### Prompt In cpp, your task is to solve the following problem: AtCoDeer the deer recently bought three paint cans. The color of the one he bought two days ago is a, the color of the one he bought yesterday is b, and the color of the one he bought today is c. Here, the color of each paint can is represented by an int...
#include <bits/stdc++.h> using namespace std; int main() { set<int> s; int a, b, c; cin >> a >> b >> c; s.insert(a); s.insert(b); s.insert(c); cout << s.size() << endl; }
### Prompt Develop a solution in Cpp to the problem described below: AtCoDeer the deer recently bought three paint cans. The color of the one he bought two days ago is a, the color of the one he bought yesterday is b, and the color of the one he bought today is c. Here, the color of each paint can is represented by a...
#include <bits/stdc++.h> using namespace std; int main() { int a,b,c; cin >> a >> b >> c; set<int> set1{a,b,c}; cout << set1.size() << endl; }
### Prompt Develop a solution in cpp to the problem described below: AtCoDeer the deer recently bought three paint cans. The color of the one he bought two days ago is a, the color of the one he bought yesterday is b, and the color of the one he bought today is c. Here, the color of each paint can is represented by a...
#include<stdio.h> bool ck[110]; int main() { int a,b,c,ans=0; scanf("%d%d%d",&a,&b,&c); ck[a]=1;ck[b]=1;ck[c]=1; for(int i=1;i<=110;i++)ans+=ck[i]; printf("%d",ans); }
### Prompt Create a solution in Cpp for the following problem: AtCoDeer the deer recently bought three paint cans. The color of the one he bought two days ago is a, the color of the one he bought yesterday is b, and the color of the one he bought today is c. Here, the color of each paint can is represented by an inte...
#include<iostream> using namespace std; int main(){ int a, b, c; cin>>a>>b>>c; if(a==b&&b==c)cout<<"1\n"; else if(a==b||a==c||b==c)cout<<"2\n"; else cout<<"3\n"; }
### Prompt Develop a solution in Cpp to the problem described below: AtCoDeer the deer recently bought three paint cans. The color of the one he bought two days ago is a, the color of the one he bought yesterday is b, and the color of the one he bought today is c. Here, the color of each paint can is represented by a...
#include <bits/stdc++.h> using namespace std; int main() { int a, b, c; cin >> a >> b >> c; cout << 3 - min((a == b) + (b == c) + (c == a), 2) << endl; }
### Prompt Generate a cpp solution to the following problem: AtCoDeer the deer recently bought three paint cans. The color of the one he bought two days ago is a, the color of the one he bought yesterday is b, and the color of the one he bought today is c. Here, the color of each paint can is represented by an intege...
#include <bits/stdc++.h> using namespace std; int main(){ //入力 int a,b,c; cin >> a >> b >> c; set<int> ans={a,b,c}; cout << ans.size() << endl; }
### Prompt Develop a solution in Cpp to the problem described below: AtCoDeer the deer recently bought three paint cans. The color of the one he bought two days ago is a, the color of the one he bought yesterday is b, and the color of the one he bought today is c. Here, the color of each paint can is represented by a...
#include <bits/stdc++.h> using namespace std; int main(){ set<int> ans; int a,b,c; cin>>a>>b>>c; ans.insert(a); ans.insert(b); ans.insert(c); cout<<ans.size()<<endl; }
### Prompt Construct a cpp code solution to the problem outlined: AtCoDeer the deer recently bought three paint cans. The color of the one he bought two days ago is a, the color of the one he bought yesterday is b, and the color of the one he bought today is c. Here, the color of each paint can is represented by an i...
#include <iostream> using namespace std; int main() { int a, b, c, ans = 1; cin >> a >> b >> c; if (b-a != 0 && c-a != 0)ans++; if (b != c)ans++; cout << ans << endl; }
### Prompt Construct a Cpp code solution to the problem outlined: AtCoDeer the deer recently bought three paint cans. The color of the one he bought two days ago is a, the color of the one he bought yesterday is b, and the color of the one he bought today is c. Here, the color of each paint can is represented by an i...
#include <iostream> #include <set> using namespace std; int main() { set<int> s; for (int a; cin >> a;) { s.insert(a); } cout << s.size() << endl; }
### Prompt Develop a solution in CPP to the problem described below: AtCoDeer the deer recently bought three paint cans. The color of the one he bought two days ago is a, the color of the one he bought yesterday is b, and the color of the one he bought today is c. Here, the color of each paint can is represented by a...
#include<bits/stdc++.h> using namespace std; int main(){ int a,b,c; cin>>a>>b>>c; int cnt=1; if(a!=b) cnt++; if(a!=c&&b!=c) cnt++; cout<<cnt<<endl; }
### Prompt Develop a solution in cpp to the problem described below: AtCoDeer the deer recently bought three paint cans. The color of the one he bought two days ago is a, the color of the one he bought yesterday is b, and the color of the one he bought today is c. Here, the color of each paint can is represented by a...
#include <iostream> #include <set> using namespace std; int main(){ int a; set <int> set_i; for(int i=0;i<3;i++){ cin >> a; set_i.insert(a); } cout << set_i.size() << endl; }
### Prompt Generate a cpp solution to the following problem: AtCoDeer the deer recently bought three paint cans. The color of the one he bought two days ago is a, the color of the one he bought yesterday is b, and the color of the one he bought today is c. Here, the color of each paint can is represented by an intege...
#include<iostream> using namespace std; int main() { int a,b,c; cin>>a>>b>>c; int ans=1; if(b!=a)ans++; if(c!=a&&c!=b)ans++; cout<<ans; }
### Prompt Your challenge is to write a CPP solution to the following problem: AtCoDeer the deer recently bought three paint cans. The color of the one he bought two days ago is a, the color of the one he bought yesterday is b, and the color of the one he bought today is c. Here, the color of each paint can is repres...
#include<iostream> using namespace std; int main(){ int a,b,c,d=3; cin>>a>>b>>c; if(a==b)d--; if(c==b)d--; else if(c==a)d--; cout<<d; return 0; }
### Prompt Construct a CPP code solution to the problem outlined: AtCoDeer the deer recently bought three paint cans. The color of the one he bought two days ago is a, the color of the one he bought yesterday is b, and the color of the one he bought today is c. Here, the color of each paint can is represented by an i...
#include <iostream> using namespace std; int main() { int a, b, c; cin >> a >> b >> c; cout << 1 + (a != b) + (a != c && b != c) << endl; }
### Prompt Your task is to create a cpp solution to the following problem: AtCoDeer the deer recently bought three paint cans. The color of the one he bought two days ago is a, the color of the one he bought yesterday is b, and the color of the one he bought today is c. Here, the color of each paint can is represente...
#include <bits/stdc++.h> using namespace std; set<int>st; int main(){ int x=3; while(x--){int y;cin>>y;st.insert(y);} cout<<st.size(); }
### Prompt Generate a CPP solution to the following problem: AtCoDeer the deer recently bought three paint cans. The color of the one he bought two days ago is a, the color of the one he bought yesterday is b, and the color of the one he bought today is c. Here, the color of each paint can is represented by an intege...
#include<iostream> #include<set> using namespace std; int main(){ set<int> s; int a[3]; for(int i=0;i<3;i++){ cin>>a[i]; s.insert(a[i]); } cout<<s.size()<<endl; }
### Prompt Construct a CPP code solution to the problem outlined: AtCoDeer the deer recently bought three paint cans. The color of the one he bought two days ago is a, the color of the one he bought yesterday is b, and the color of the one he bought today is c. Here, the color of each paint can is represented by an i...
#include<bits/stdc++.h> using namespace std; int main(){ set<int> s; for(int i=0;i<3;i++){ int X; cin>>X; s.insert(X); } cout<<s.size()<<endl; }
### Prompt Please provide a CPP coded solution to the problem described below: AtCoDeer the deer recently bought three paint cans. The color of the one he bought two days ago is a, the color of the one he bought yesterday is b, and the color of the one he bought today is c. Here, the color of each paint can is repres...
#include <iostream> #include <set> using namespace std; int main(void){ int a,b,c; cin >> a >> b >> c; set<int> st{a,b,c}; cout << st.size() << endl; return 0; }
### Prompt Your task is to create a cpp solution to the following problem: AtCoDeer the deer recently bought three paint cans. The color of the one he bought two days ago is a, the color of the one he bought yesterday is b, and the color of the one he bought today is c. Here, the color of each paint can is represente...
#include <bits/stdc++.h> using namespace std; int main() { int a,b,c; cin >> a >> b >> c; cout << max(1, ((a != b)+(b != c)+(c != a))) << endl; }
### Prompt Create a solution in CPP for the following problem: AtCoDeer the deer recently bought three paint cans. The color of the one he bought two days ago is a, the color of the one he bought yesterday is b, and the color of the one he bought today is c. Here, the color of each paint can is represented by an inte...
#include "bits/stdc++.h" using namespace std; int main(){ set<long int> s; long int a,b,c; cin >> a >> b >> c; s.insert(a); s.insert(b); s.insert(c); cout << s.size() << endl; }
### Prompt Generate a Cpp solution to the following problem: AtCoDeer the deer recently bought three paint cans. The color of the one he bought two days ago is a, the color of the one he bought yesterday is b, and the color of the one he bought today is c. Here, the color of each paint can is represented by an intege...