output
stringlengths
52
181k
instruction
stringlengths
296
182k
#include <iostream> #include "string" using namespace std; int main(){ while(1){ string s1; cin>>s1; if(s1==".") break; string s2; cin>>s2; if(s1==s2){ cout<<"IDENTICAL"<<endl; continue; } string t1=s1; string t2=s2; while (1) { size_t d1b=t1.find('\"'); if(d1b==string::npos) br...
### Prompt Your task is to create a CPP solution to the following problem: Almost Identical Programs The programming contest named Concours de Programmation Comtemporaine Interuniversitaire (CPCI) has a judging system similar to that of ICPC; contestants have to submit correct outputs for two different inputs to be ...
#include <iostream> #include <iomanip> #include <cstdio> #include <string> #include <cstring> #include <deque> #include <list> #include <queue> #include <stack> #include <vector> #include <utility> #include <algorithm> #include <map> #include <set> #include <complex> #include <cmath> #include <limits> #include <cfloat>...
### Prompt Create a solution in Cpp for the following problem: Almost Identical Programs The programming contest named Concours de Programmation Comtemporaine Interuniversitaire (CPCI) has a judging system similar to that of ICPC; contestants have to submit correct outputs for two different inputs to be accepted as ...
#include<bits/stdc++.h> using namespace std; int main(){ while(1){ string s1,s2; cin>>s1; if(s1==".")return 0; cin>>s2; string s11[201],s22[201]; for(int i=0;i<201;i++){ s11[i]=".";s22[i]="."; } s11[0]="";s22[0]=""; int now1=0,now2=0; for(int i=0;i<(int)s1.length();i++){ if(s1[i]=='"'){ ...
### Prompt Your challenge is to write a cpp solution to the following problem: Almost Identical Programs The programming contest named Concours de Programmation Comtemporaine Interuniversitaire (CPCI) has a judging system similar to that of ICPC; contestants have to submit correct outputs for two different inputs to...
#include <bits/stdc++.h> using namespace std; int main() { string s1, s2; while (cin >> s1, s1 != ".") { cin >> s2; if (s1 == s2) { puts("IDENTICAL"); continue; } int n1 = s1.size(), n2 = s2.size(); bool ok = true; int i1 = 0, i2 = 0, cnt = 0; while (i1 < n1 || i2 < n2) { string t1, t2; whi...
### Prompt Develop a solution in CPP to the problem described below: Almost Identical Programs The programming contest named Concours de Programmation Comtemporaine Interuniversitaire (CPCI) has a judging system similar to that of ICPC; contestants have to submit correct outputs for two different inputs to be accept...
#include "bits/stdc++.h" using namespace std; typedef pair<bool,string> P; vector<P> parse(string s) { vector<P> ret; int i=0; while(i<s.size()) { if(s[i]=='\"') { string tmp; i++; while(s[i]!='\"') { tmp+=s[i]; i++; } ret.push_back(P(true,tmp)); i++; }else{ string tmp; wh...
### Prompt Your challenge is to write a Cpp solution to the following problem: Almost Identical Programs The programming contest named Concours de Programmation Comtemporaine Interuniversitaire (CPCI) has a judging system similar to that of ICPC; contestants have to submit correct outputs for two different inputs to...
#include "bits/stdc++.h" using namespace std; typedef long long ll; void split(string s, vector<string>&v){ string tmp = ""; for(int i = 0; i < s.size(); i++){ if(s[i] == '"'){ v.push_back(tmp); tmp = ""; } else tmp += s[i]; } if(tmp.size())v.push_back(tm...
### Prompt In Cpp, your task is to solve the following problem: Almost Identical Programs The programming contest named Concours de Programmation Comtemporaine Interuniversitaire (CPCI) has a judging system similar to that of ICPC; contestants have to submit correct outputs for two different inputs to be accepted as...
#include<iostream> #include<cstdio> #include<vector> #define REP(i,s,n) for(int i=s;i<n;++i) #define rep(i,n) REP(i,0,n) using namespace std; const string Y = "IDENTICAL"; const string N = "DIFFERENT"; const string C = "CLOSE"; string elim(string s) { string ret = ""; bool toggle = false; rep(i,(int)s.size())...
### Prompt Construct a cpp code solution to the problem outlined: Almost Identical Programs The programming contest named Concours de Programmation Comtemporaine Interuniversitaire (CPCI) has a judging system similar to that of ICPC; contestants have to submit correct outputs for two different inputs to be accepted ...
#include<iostream> #include<string> #include<vector> using namespace std; void split(string s, vector<string> &v) { s += '"'; string buf = ""; for (int i = 0; i < s.size(); i++) { if (s[i] == '"') { v.push_back(buf); buf = ""; } else buf += s[i]; } } int main() { while (1) { string S1, S2; cin ...
### Prompt Generate a Cpp solution to the following problem: Almost Identical Programs The programming contest named Concours de Programmation Comtemporaine Interuniversitaire (CPCI) has a judging system similar to that of ICPC; contestants have to submit correct outputs for two different inputs to be accepted as a ...
#include<string> #include<iostream> #include<vector> using namespace std; vector<string> split(const string& s, char delim) { int left = 0; auto v = vector<string>(); for (int i = 0; i < s.size(); ++i) { if (s[i] == delim) { v.push_back(s.substr(left, i - left)); left = i +...
### Prompt Please formulate a Cpp solution to the following problem: Almost Identical Programs The programming contest named Concours de Programmation Comtemporaine Interuniversitaire (CPCI) has a judging system similar to that of ICPC; contestants have to submit correct outputs for two different inputs to be accept...
#include <bits/stdc++.h> #pragma GCC target("avx2") #pragma GCC optimize("O3") #pragma GCC optimize("unroll-loops") using namespace std; #define rep(i, n) for(int i = 0; i < n; ++i) #define rep2(i, a, b) for(int i = (a); i <= (b); ++i) #define ll long long int main() { while(1) { string s; cin >> s...
### Prompt Please create a solution in CPP to the following problem: Almost Identical Programs The programming contest named Concours de Programmation Comtemporaine Interuniversitaire (CPCI) has a judging system similar to that of ICPC; contestants have to submit correct outputs for two different inputs to be accept...
#include <iostream> #include <string> #include <vector> using namespace std; int main() { string s1, s2; while (cin >> s1) { if (s1 == ".") { break; } cin >> s2; if (s1 == s2) { cout << "IDENTICAL" << endl; } else { int s1c = 0; vector<string> s11; string subs1 = ""; string kk = ""; ...
### Prompt Your challenge is to write a CPP solution to the following problem: Almost Identical Programs The programming contest named Concours de Programmation Comtemporaine Interuniversitaire (CPCI) has a judging system similar to that of ICPC; contestants have to submit correct outputs for two different inputs to...
#include <bits/stdc++.h> using namespace std; int main(){ while (1){ string s1; cin >> s1; if (s1 == "."){ break; } string s2; cin >> s2; if (s1 == s2){ cout << "IDENTICAL" << endl; } else { int N = s1.size(); vector<string> A(1); for (int i = 0; i < N; i+...
### Prompt Please formulate a Cpp solution to the following problem: Almost Identical Programs The programming contest named Concours de Programmation Comtemporaine Interuniversitaire (CPCI) has a judging system similar to that of ICPC; contestants have to submit correct outputs for two different inputs to be accept...
#include <bits/stdc++.h> using namespace std; int main() { while(1){ string s1,s2; cin >> s1; if(s1[0] == '.' && s1.size() == 1){ break; } cin >> s2; string::iterator itr1 = s1.begin(),itr2 = s2.begin(); bool firstdiff = false; boo...
### Prompt Develop a solution in cpp to the problem described below: Almost Identical Programs The programming contest named Concours de Programmation Comtemporaine Interuniversitaire (CPCI) has a judging system similar to that of ICPC; contestants have to submit correct outputs for two different inputs to be accept...
#include<bits/stdc++.h> using namespace std; int foo(vector<string> s[], vector<string> t[]){ if(s[0].size() != t[0].size() || s[1].size() != t[1].size())return false; // cout<<s[0].size()<<" "<<t[0].size()<<" "<<s[1].size()<<" "<<t[1].size()<<endl; for(int i = 0; i < s[0].size(); i++){ if(s[0][i] != t[0][i...
### Prompt Please create a solution in Cpp to the following problem: Almost Identical Programs The programming contest named Concours de Programmation Comtemporaine Interuniversitaire (CPCI) has a judging system similar to that of ICPC; contestants have to submit correct outputs for two different inputs to be accept...
#include<iostream> #include<vector> #include<cmath> #include<algorithm> #include<utility> #include<map> #include<set> #include<string> using namespace std; #define ll long long bool check(string s1,string s2){ int l = 0, r = 0; bool flag = false; int cnt = 0; while(l < s1.size() || r < s2.size()){ ...
### Prompt In cpp, your task is to solve the following problem: Almost Identical Programs The programming contest named Concours de Programmation Comtemporaine Interuniversitaire (CPCI) has a judging system similar to that of ICPC; contestants have to submit correct outputs for two different inputs to be accepted as...
#include<iostream> #include<cstring> using namespace std; char ca[2][205]; void print(int n){ if(n<0)cout<<"DIFFERENT"<<endl; if(n==0)cout<<"CLOSE"<<endl; if(n>0)cout<<"IDENTICAL"<<endl; } bool check(int a,int b){ if(a>=strlen(ca[0]) && b>=strlen(ca[1]))return true; if(a>=strlen(ca[0]) || b>=strlen(ca[1]))return...
### Prompt Construct a CPP code solution to the problem outlined: Almost Identical Programs The programming contest named Concours de Programmation Comtemporaine Interuniversitaire (CPCI) has a judging system similar to that of ICPC; contestants have to submit correct outputs for two different inputs to be accepted ...
#include <bits/stdc++.h> using namespace std; using ll = int64_t; template <typename T> using V = vector<T>; using VS = vector<string>; pair<VS, VS> parse(const string &S) { VS num, str; bool in_quot = false; bool init = true; string now = ""; for(char c : S) { if(c == ';' && !in_quot) { ...
### Prompt Your task is to create a Cpp solution to the following problem: Almost Identical Programs The programming contest named Concours de Programmation Comtemporaine Interuniversitaire (CPCI) has a judging system similar to that of ICPC; contestants have to submit correct outputs for two different inputs to be ...
#include <iostream> #include <cstdio> #include <algorithm> #include <cstring> using namespace std; int main() { int k,l,la,lb,ans,stat,poi; char a[205],b[205]; scanf("%s",a);//getchar(); while(a[0]!='.' || a[1]!='\0') { scanf("%s",b);//getchar(); ans=stat=k=l=poi=0; la=strl...
### Prompt Please formulate a CPP solution to the following problem: Almost Identical Programs The programming contest named Concours de Programmation Comtemporaine Interuniversitaire (CPCI) has a judging system similar to that of ICPC; contestants have to submit correct outputs for two different inputs to be accept...
#include <iostream> #include <algorithm> #include <string> using namespace std; string s1, s2; int main() { while (1) { int count = 0; int n1 = 0; int n2 = 0; int error = 0; cin >> s1; if(s1 == ".") break; cin >> s2; if(s1 == s2) { cout << "IDENTICAL" << endl; continue;...
### Prompt Your task is to create a Cpp solution to the following problem: Almost Identical Programs The programming contest named Concours de Programmation Comtemporaine Interuniversitaire (CPCI) has a judging system similar to that of ICPC; contestants have to submit correct outputs for two different inputs to be ...
#include<iostream> #include<cstdio> #include<string> #include<vector> #include<cmath> #include<algorithm> #include<functional> #include<iomanip> #include<queue> #include<ciso646> #include<random> #include<map> #include<set> #include<complex> using namespace std; typedef long long ll; const ll MOD = 998244353; const ll ...
### Prompt Create a solution in CPP for the following problem: Almost Identical Programs The programming contest named Concours de Programmation Comtemporaine Interuniversitaire (CPCI) has a judging system similar to that of ICPC; contestants have to submit correct outputs for two different inputs to be accepted as ...
#include <bits/stdc++.h> #define rep(i,j,k) for(int i=(int)j;i<(int)k;i++) #define itrep(x) for(auto it=(x).begin();it!=(x).end();it++) #define Sort(x) sort((x).begin(),(x).end()) #define all(x) (x).begin(),(x).end() #define fi first #define se second #define vi vector<int> #define INF (int)1e9 #define INFL 1e18 #defi...
### Prompt Please create a solution in CPP to the following problem: Almost Identical Programs The programming contest named Concours de Programmation Comtemporaine Interuniversitaire (CPCI) has a judging system similar to that of ICPC; contestants have to submit correct outputs for two different inputs to be accept...
#include<iostream> #include<algorithm> using namespace std; int main(){ while(true){ string s1,s2; cin >> s1; if(s1[0]=='.')break; cin >> s2; int count=2; for(int i=0,j=0;true;i++,j++){ if(s1[i]!=s2[j]){//そもそも違うコードだったら count=0; break; } if(s1[i]=='\0'||s2[j]...
### Prompt In CPP, your task is to solve the following problem: Almost Identical Programs The programming contest named Concours de Programmation Comtemporaine Interuniversitaire (CPCI) has a judging system similar to that of ICPC; contestants have to submit correct outputs for two different inputs to be accepted as...
#include<iostream> #include<cstdio> #include<cstring> #include<string.h> using namespace std; char s1[205],s2[205]; bool mark; int w,ww,i,j; int main() { while(1) { w=0; mark=0; scanf("%s",s1); if(s1[0]=='.') break; scanf("%s",s2); int l=strlen(s1),len=strlen(s2); for(i=0,j=0;i<l&&j<len;j++,i++) { ...
### Prompt Generate a CPP solution to the following problem: Almost Identical Programs The programming contest named Concours de Programmation Comtemporaine Interuniversitaire (CPCI) has a judging system similar to that of ICPC; contestants have to submit correct outputs for two different inputs to be accepted as a ...
#include<iostream> #include<cstdio> #include<cstdlib> #include<cstring> #include<cmath> #include<string> #include<algorithm> #include<vector> #include<queue> #include<set> #include<map> #include<stack> #define MOD 10000000 using namespace std; typedef long long LL; long long quickpow(long long n, long long base) { ...
### Prompt Construct a CPP code solution to the problem outlined: Almost Identical Programs The programming contest named Concours de Programmation Comtemporaine Interuniversitaire (CPCI) has a judging system similar to that of ICPC; contestants have to submit correct outputs for two different inputs to be accepted ...
#include <iostream> #include <algorithm> #include <vector> #include <string> #define int long long using namespace std; signed main() { string s, t; while (cin >> s && s != ".") { cin >> t; string s_a[234], t_a[234]; int i = 0, s_l = 0, t_l = 0; for (i = 0; i < s.size(); i++) { while (i < s.size() && s[i] ...
### Prompt Please create a solution in cpp to the following problem: Almost Identical Programs The programming contest named Concours de Programmation Comtemporaine Interuniversitaire (CPCI) has a judging system similar to that of ICPC; contestants have to submit correct outputs for two different inputs to be accept...
#include<bits/stdc++.h> using namespace std; int main(){ string s1,s2; bool t = false; while(1){ int cnt = 0; cin>>s1; if(s1==".") break; cin>>s2; if(s1==s2){ cout<<"IDENTICAL"<<endl; continue; } else{ int i=0; int j=0; t = false; while(1){ if(s1[i]=='\0' && s2[j]=='\0'...
### Prompt Construct a CPP code solution to the problem outlined: Almost Identical Programs The programming contest named Concours de Programmation Comtemporaine Interuniversitaire (CPCI) has a judging system similar to that of ICPC; contestants have to submit correct outputs for two different inputs to be accepted ...
#include <algorithm> #include <iostream> #include <vector> using namespace std; void hoge(string s, string &new_s, vector<string> &vs) { bool in_quote = false; string sub_s = ""; for (char c: s) { if (in_quote) { if (c == '"') { vs.emplace_back(sub_s); sub_s = ""; ...
### Prompt Construct a CPP code solution to the problem outlined: Almost Identical Programs The programming contest named Concours de Programmation Comtemporaine Interuniversitaire (CPCI) has a judging system similar to that of ICPC; contestants have to submit correct outputs for two different inputs to be accepted ...
#include <bits/stdc++.h> using namespace std; using ll = long long; vector<string> split(string s) { vector<string> ret; int bef = 0; for (int i = 0; i < s.size(); i++) { if (s[i] == '"') { ret.push_back(s.substr(bef, i - bef + 1)); bef = i + 1; } } if (bef < s.size()) ret.push_back(...
### Prompt Please create a solution in cpp to the following problem: Almost Identical Programs The programming contest named Concours de Programmation Comtemporaine Interuniversitaire (CPCI) has a judging system similar to that of ICPC; contestants have to submit correct outputs for two different inputs to be accept...
#include <bits/stdc++.h> using namespace std; vector<string> make(string s) { vector<string> v{""}; for(char c:s) { if(c=='\"') { v.push_back(""); } else { v.back()+=c; } } return v; } const string dif="DIFFERENT",ide="IDENTIC...
### Prompt Your task is to create a Cpp solution to the following problem: Almost Identical Programs The programming contest named Concours de Programmation Comtemporaine Interuniversitaire (CPCI) has a judging system similar to that of ICPC; contestants have to submit correct outputs for two different inputs to be ...
#include<iostream> #include<string> using namespace std; int main(){ while(1){ string s1,s2; cin>>s1>>s2; if(s1=="."){ break; } if(s1==s2){ cout<<"IDENTICAL"<<endl; continue; } string t1=s1; string t2=s2; while(1){ size_t d1b=t1.find('\"'); if(d1b==string::npos){ break...
### Prompt Your task is to create a cpp solution to the following problem: Almost Identical Programs The programming contest named Concours de Programmation Comtemporaine Interuniversitaire (CPCI) has a judging system similar to that of ICPC; contestants have to submit correct outputs for two different inputs to be ...
#include<iostream> #include<vector> using namespace std; string exec(vector<string> &v, string s){ string ret = ""; for(int i = 0; i < s.length(); i++){ if(s[i] == '"'){ i++; string tmp = ""; while(i < s.length() && s[i] != '"') tmp += s[i], i++; v.push_...
### Prompt Please provide a CPP coded solution to the problem described below: Almost Identical Programs The programming contest named Concours de Programmation Comtemporaine Interuniversitaire (CPCI) has a judging system similar to that of ICPC; contestants have to submit correct outputs for two different inputs to...
#include<cstdio> #include<iostream> #include<cstring> #include<cmath> using namespace std; char s1[205],s2[205]; int main() { for(;;) { scanf("%s",s1); if(s1[0]=='.')break; scanf("%s",s2); int len1=strlen(s1); int len2=strlen(s2); int t1=0,t2=0; for(int i=...
### Prompt Construct a cpp code solution to the problem outlined: Almost Identical Programs The programming contest named Concours de Programmation Comtemporaine Interuniversitaire (CPCI) has a judging system similar to that of ICPC; contestants have to submit correct outputs for two different inputs to be accepted ...
#include <bits/stdc++.h> using namespace std; using ll=long long; using ull=unsigned long long; using pii=pair<int,int>; #define INF LONG_MAX #define MOD 1000000007 #define rng(a) a.begin(),a.end() #define rrng(a) a.end(),a.begin() int main(){ ios::sync_with_stdio(false); cin.tie(0); while(true){ string ...
### Prompt Construct a Cpp code solution to the problem outlined: Almost Identical Programs The programming contest named Concours de Programmation Comtemporaine Interuniversitaire (CPCI) has a judging system similar to that of ICPC; contestants have to submit correct outputs for two different inputs to be accepted ...
#include<iostream> #include<algorithm> #include<numeric> #include<vector> #include <string> using namespace std; void split(string s, vector<string> &v){ v.clear(); s +='"'; string str=""; for(int i=0;i<s.size();i++){ if(s[i]=='"'){ v.push_back(str); str=""; } ...
### Prompt Please provide a CPP coded solution to the problem described below: Almost Identical Programs The programming contest named Concours de Programmation Comtemporaine Interuniversitaire (CPCI) has a judging system similar to that of ICPC; contestants have to submit correct outputs for two different inputs to...
#include<iostream> #include<algorithm> #include<cstdio> #include<cmath> #include<cctype> #include<math.h> #include<string> #include<string.h> #include<stack> #include<queue> #include<vector> #include<utility> #include<set> #include<map> #include<stdlib.h> #include<iomanip> using namespace std; #define ll long long #d...
### Prompt Develop a solution in Cpp to the problem described below: Almost Identical Programs The programming contest named Concours de Programmation Comtemporaine Interuniversitaire (CPCI) has a judging system similar to that of ICPC; contestants have to submit correct outputs for two different inputs to be accept...
#include <bits/stdc++.h> using namespace std; int main () { string s1, s2; while (cin >> s1, s1 != ".") { cin >> s2; if (s1 == s2) { cout << "IDENTICAL" << endl; continue; } bool quote = false, flag = true; int mcnt = 0, i = 0, j = 0; while (i < s1.size () && j < s2.size ()) { if (s1[i] == '"'...
### Prompt Please formulate a Cpp solution to the following problem: Almost Identical Programs The programming contest named Concours de Programmation Comtemporaine Interuniversitaire (CPCI) has a judging system similar to that of ICPC; contestants have to submit correct outputs for two different inputs to be accept...
#include<bits/stdc++.h> #define INF 1e9 #define llINF 1e18 #define MOD 1000000007 #define pb push_back #define mp make_pair #define F first #define S second #define ll long long #define ull unsigned long long #define vi vector<ll> #define vvi vector<vi> #define DBG_N(hoge) cerr<<" "<<(hoge)<<endl; #define DBG cerr<<"!...
### Prompt Please create a solution in Cpp to the following problem: Almost Identical Programs The programming contest named Concours de Programmation Comtemporaine Interuniversitaire (CPCI) has a judging system similar to that of ICPC; contestants have to submit correct outputs for two different inputs to be accept...
#include <bits/stdc++.h> #define int long long using namespace std; signed main(){ while(1){ string s1, s2; cin>>s1; if( s1 == "." ) break; cin>>s2; if( s1 == s2 ){ cout<<"IDENTICAL"<<endl; continue; } int cnt1 = 0; string str; vector<string> A, B; ...
### Prompt Please provide a CPP coded solution to the problem described below: Almost Identical Programs The programming contest named Concours de Programmation Comtemporaine Interuniversitaire (CPCI) has a judging system similar to that of ICPC; contestants have to submit correct outputs for two different inputs to...
#include <bits/stdc++.h> using namespace std; typedef long long ll; typedef unsigned long long ull; typedef pair<ll, ll> P; #define fi first #define se second #define repl(i,a,b) for(ll i=(ll)(a);i<(ll)(b);i++) #define rep(i,n) repl(i,0,n) #define all(x) (x).begin(),(x).end() #define dbg(x) cout<<#x"="<<x<<endl #defi...
### Prompt Your task is to create a cpp solution to the following problem: Almost Identical Programs The programming contest named Concours de Programmation Comtemporaine Interuniversitaire (CPCI) has a judging system similar to that of ICPC; contestants have to submit correct outputs for two different inputs to be ...
#include <iostream> #include <string> #include <vector> using namespace std; int a[1000]; int main(void) { while (1) { string s1, s2; vector<string> s1double; vector<string> s2double; vector<string> s1word; vector<string> s2word; cin >> s1 >> s2; if (s1[0] == '.') { break; } ...
### Prompt Your challenge is to write a Cpp solution to the following problem: Almost Identical Programs The programming contest named Concours de Programmation Comtemporaine Interuniversitaire (CPCI) has a judging system similar to that of ICPC; contestants have to submit correct outputs for two different inputs to...
#include<iostream> #include<string> using namespace std; int main(){ while(1){ string s1; cin>>s1; if(s1==".") break; string s2; cin>>s2; if(s1==s2){ cout<<"IDENTICAL"<<endl; continue; } string t1=s1; string t2=s2; while(1){ size_t d1b=t1.find('\"'); if(d1b==string::npos...
### Prompt Construct a CPP code solution to the problem outlined: Almost Identical Programs The programming contest named Concours de Programmation Comtemporaine Interuniversitaire (CPCI) has a judging system similar to that of ICPC; contestants have to submit correct outputs for two different inputs to be accepted ...
#include <bits/stdc++.h> using namespace std; using ll = long long; using pii = pair<int, int>; int main() { cin.tie(0); ios_base::sync_with_stdio(false); cout << fixed << setprecision(10); string s, t; while (cin >> s >> t, s != ".") { if (s == t) { cout << "IDENTICAL" << endl; continue; ...
### Prompt In Cpp, your task is to solve the following problem: Almost Identical Programs The programming contest named Concours de Programmation Comtemporaine Interuniversitaire (CPCI) has a judging system similar to that of ICPC; contestants have to submit correct outputs for two different inputs to be accepted as...
#include<iostream> #include<vector> #include<algorithm> #include<iomanip> #include<stack> #include<queue> #include<string> #include<set> #include<map> #include<cmath> #include<cstring> using namespace std; void read(string s,vector<string> &other,vector<string> &str){ int state = 0; string now = ""; for(in...
### Prompt Please formulate a cpp solution to the following problem: Almost Identical Programs The programming contest named Concours de Programmation Comtemporaine Interuniversitaire (CPCI) has a judging system similar to that of ICPC; contestants have to submit correct outputs for two different inputs to be accept...
#include"bits/stdc++.h" using namespace std; int main() { string s1, s2; st:; cin >> s1; while (s1 != ".") { cin >> s2; bool f = false; // trueなら""中 int i1, i2; i1 = i2 = 0; // 次に見る文字 int n1 = s1.length(); int n2 = s2.length(); int count_diff = 0; while (true) { if (!f) { if (s1[i1] != s2...
### Prompt Please formulate a CPP solution to the following problem: Almost Identical Programs The programming contest named Concours de Programmation Comtemporaine Interuniversitaire (CPCI) has a judging system similar to that of ICPC; contestants have to submit correct outputs for two different inputs to be accept...
#include <iostream> #include <string> #include <vector> using namespace std; int main() { int cnt; string s1, s2, tmp; vector<string> sv1, sv2; while (cin >> s1) { if (s1 == ".") { break; } cin >> s2; sv1.clear(); sv2.clear(); tmp = ""; cnt = 0; if (s1 == s2)...
### Prompt Please provide a CPP coded solution to the problem described below: Almost Identical Programs The programming contest named Concours de Programmation Comtemporaine Interuniversitaire (CPCI) has a judging system similar to that of ICPC; contestants have to submit correct outputs for two different inputs to...
#include <iostream> #include <string> #include <vector> using namespace std; string s[2]; string eraseElements(string s) { string ret; bool isin = false; for (int i = 0; i < s.length(); i++) { if (s[i] == '"') { isin = !isin; continue; } if (!isin) { ret += s[i]; } } return ret; } vector<string> getElemen...
### Prompt Please create a solution in cpp to the following problem: Almost Identical Programs The programming contest named Concours de Programmation Comtemporaine Interuniversitaire (CPCI) has a judging system similar to that of ICPC; contestants have to submit correct outputs for two different inputs to be accept...
#include <bits/stdc++.h> #define pb push_back using namespace std; pair<vector<string>, vector<string>> extract(string s1) { vector<string> command1, str1; bool is_command = true; string s= ""; for (char c : s1) { if (c == '"') { if (is_command) command1.pb(s); else str1...
### Prompt Develop a solution in CPP to the problem described below: Almost Identical Programs The programming contest named Concours de Programmation Comtemporaine Interuniversitaire (CPCI) has a judging system similar to that of ICPC; contestants have to submit correct outputs for two different inputs to be accept...
#include<bits/stdc++.h> using namespace std; typedef long long LL; typedef pair<LL,LL> P; const LL mod=1e9+7; const LL LINF=1LL<<62; const int INF=1<<17; int main(){ string s,t; while(cin >> s >> t){ if(s==".") return 0; vector<string> p,q; string tmp=""; for(int i=0;i<s.length(...
### Prompt Create a solution in cpp for the following problem: Almost Identical Programs The programming contest named Concours de Programmation Comtemporaine Interuniversitaire (CPCI) has a judging system similar to that of ICPC; contestants have to submit correct outputs for two different inputs to be accepted as ...
#include<iostream> #include<algorithm> #include<string> #include<cstdlib> #include<map> #include<iomanip> #include<sstream> #include<vector> #include<stack> #include<math.h> #include<queue> #include<complex> #include<random> #include<ctime> #include<set> using namespace std; const long long int mod=1000000007; const ...
### Prompt Generate a CPP solution to the following problem: Almost Identical Programs The programming contest named Concours de Programmation Comtemporaine Interuniversitaire (CPCI) has a judging system similar to that of ICPC; contestants have to submit correct outputs for two different inputs to be accepted as a ...
#include <iostream> using namespace std; int main(void) { int sind,tind,diff; string s,t,ss,st; while (cin >> s, s != ".") { cin >> t; diff = sind = tind = 0; while (diff < 2 && sind < s.length() && tind < t.length()) { if (s[sind] != t[tind]) { diff = 2; } else { if (s[sind] == '\"') { ...
### Prompt Please provide a Cpp coded solution to the problem described below: Almost Identical Programs The programming contest named Concours de Programmation Comtemporaine Interuniversitaire (CPCI) has a judging system similar to that of ICPC; contestants have to submit correct outputs for two different inputs to...
#include <bits/stdc++.h> using namespace std; #define rep(i,n) for(int i=0,i##_cond=(n);i<i##_cond;++i) vector<string> split(string s, const string &b){ vector<string> res; while(1){ int pos = s.find(b); if(pos == -1) break; res.push_back(s.substr(0,pos)); s = s.substr(pos+1,s.size()); } if(s ...
### Prompt Please create a solution in cpp to the following problem: Almost Identical Programs The programming contest named Concours de Programmation Comtemporaine Interuniversitaire (CPCI) has a judging system similar to that of ICPC; contestants have to submit correct outputs for two different inputs to be accept...
#include <bits/stdc++.h> #define syosu(x) fixed<<setprecision(x) using namespace std; typedef long long ll; typedef unsigned int uint; typedef unsigned long long ull; typedef pair<int,int> P; typedef pair<double,double> pdd; typedef pair<ll,ll> pll; typedef vector<int> vi; typedef vector<vi> vvi; typedef vector<double>...
### Prompt Generate a Cpp solution to the following problem: Almost Identical Programs The programming contest named Concours de Programmation Comtemporaine Interuniversitaire (CPCI) has a judging system similar to that of ICPC; contestants have to submit correct outputs for two different inputs to be accepted as a ...
#include<iostream> #include<sstream> using namespace std; int main(){ while(1){ string s1,s2; cin >> s1; if(s1 == ".") return 0; cin >> s2; string s11[201], s22[201]; for(int i=0;i<201;i++){ s11[i] = "."; s22[i] = "."; } int now1=0,now2=0; for(int i=0;i<(int)s1.length();i++){ if(s1[i] == '"'){...
### Prompt Generate a CPP solution to the following problem: Almost Identical Programs The programming contest named Concours de Programmation Comtemporaine Interuniversitaire (CPCI) has a judging system similar to that of ICPC; contestants have to submit correct outputs for two different inputs to be accepted as a ...
#include<bits/stdc++.h> using namespace std; long long aa;bool bb;char ch; long long scan() { while(ch=getchar(),(ch<'0'||ch>'9')&&ch!='-'); ch=='-'?(bb=1,aa=0):(bb=0,aa=ch-48); while(ch=getchar(),(ch>='0'&&ch<='9')) aa=aa*10+ch-48; return (bb?(-aa):(aa)); } char s1[300],s2[300]; int len1,len2,flag,cnt; int main(...
### Prompt Construct a cpp code solution to the problem outlined: Almost Identical Programs The programming contest named Concours de Programmation Comtemporaine Interuniversitaire (CPCI) has a judging system similar to that of ICPC; contestants have to submit correct outputs for two different inputs to be accepted ...
#include <iostream> #include <string> using namespace std; int main(){ while(true){ string s1; cin>>s1; if(s1=="."){ break; } string s2; cin>>s2; if(s1==s2){ cout<<"IDENTICAL"<<endl; continue; } string t1=s1; string t2=s2; while(true){ size_t d1b=t1.find('\"'); if(d1b==string::npo...
### Prompt Your task is to create a Cpp solution to the following problem: Almost Identical Programs The programming contest named Concours de Programmation Comtemporaine Interuniversitaire (CPCI) has a judging system similar to that of ICPC; contestants have to submit correct outputs for two different inputs to be ...
#include<bits/stdc++.h> using namespace std; int main(){ while(1){ string s, t; cin >> s; if(s == ".") break; cin >> t; string s_other, t_other; vector<string> s_string; vector<string> t_string; int idx = 0; int s_len = (int)s.size(); int t_len = (int)t.size(); ...
### Prompt Your challenge is to write a cpp solution to the following problem: Almost Identical Programs The programming contest named Concours de Programmation Comtemporaine Interuniversitaire (CPCI) has a judging system similar to that of ICPC; contestants have to submit correct outputs for two different inputs to...
#include <bits/stdc++.h> using namespace std; int main(){ // cin.tie(0); // ios::sync_with_stdio(false); while(1){ string s; cin >> s; if(s == ".") return 0; string t; cin >> t; vector<int> p, q; for(int i=0; i<s.size(); ++i) if(s[i] == '"') p.push_back(i); p.push_back(s.size()); for(int i=0; i...
### Prompt Please create a solution in CPP to the following problem: Almost Identical Programs The programming contest named Concours de Programmation Comtemporaine Interuniversitaire (CPCI) has a judging system similar to that of ICPC; contestants have to submit correct outputs for two different inputs to be accept...
#include <iostream> #include<bits/stdc++.h> using namespace std; string s,t; int main(void){ while(1){ cin>>s; if(s==".")return 0; cin>>t; if(s==t){cout<<"IDENTICAL"<<endl;continue;} vector<int> v1,v2; vector<string>u1,u2; for(int i=0;i<s.size();i++){ if(s[i]=='"')v1.push_back(i)...
### Prompt Please formulate a cpp solution to the following problem: Almost Identical Programs The programming contest named Concours de Programmation Comtemporaine Interuniversitaire (CPCI) has a judging system similar to that of ICPC; contestants have to submit correct outputs for two different inputs to be accept...
#include <bits/stdc++.h> using namespace std; int main() { string s1; while(cin >> s1, s1 != ".") { string s2; cin >> s2; const int n = s1.size(), m = s2.size(); int cnt = 0; bool in_str = false; int i = 0, j = 0; while(i < n && j < m) { if(s1[i] != s...
### Prompt Create a solution in cpp for the following problem: Almost Identical Programs The programming contest named Concours de Programmation Comtemporaine Interuniversitaire (CPCI) has a judging system similar to that of ICPC; contestants have to submit correct outputs for two different inputs to be accepted as ...
#include<iostream> #include <string> using namespace std; int main(){ while(true){ string s1; cin>>s1; if(s1=="."){ break; } string s2; cin>>s2; if(s1==s2){ cout<<"IDENTICAL"<<endl; continue; } string t1=s1; string t2=s2; while(true){ size_t d1b =t1.find('\"'); if(d1b==stri...
### Prompt Please provide a Cpp coded solution to the problem described below: Almost Identical Programs The programming contest named Concours de Programmation Comtemporaine Interuniversitaire (CPCI) has a judging system similar to that of ICPC; contestants have to submit correct outputs for two different inputs to...
#include <bits/stdc++.h> #define int long long #define INF 1e+18 using namespace std; vector<string> constant[2],other[2]; void rekkyo(string &s,vector<string> &vec1,vector<string> &vec2){ int op = 0; string tmp = ""; for(int i = 0;i < s.length();i++){ if(s[i] == '\"'){ (op ? vec1 : vec2).push_back(tmp); t...
### Prompt Please provide a cpp coded solution to the problem described below: Almost Identical Programs The programming contest named Concours de Programmation Comtemporaine Interuniversitaire (CPCI) has a judging system similar to that of ICPC; contestants have to submit correct outputs for two different inputs to...
#include "bits/stdc++.h" #define REP(i,n) for(ll i=0;i<ll(n);++i) #define RREP(i,n) for(ll i=ll(n)-1;i>=0;--i) #define FOR(i,m,n) for(ll i=m;i<ll(n);++i) #define RFOR(i,m,n) for(ll i=ll(n)-1;i>=ll(m);--i) #define ALL(v) (v).begin(),(v).end() #define UNIQUE(v) v.erase(unique(ALL(v)),v.end()); #define INF 1000000001ll #...
### Prompt Please provide a Cpp coded solution to the problem described below: Almost Identical Programs The programming contest named Concours de Programmation Comtemporaine Interuniversitaire (CPCI) has a judging system similar to that of ICPC; contestants have to submit correct outputs for two different inputs to...
#include <bits/stdc++.h> using namespace std; const long double PI = acos(-1); typedef long long ll; typedef pair<int64_t,int64_t> pll; int dx[]={1,-1,0,0,1,-1,1,-1}; int dy[]={0,0,1,-1,1,-1,-1,1}; #define rep(i,a,b) for (int64_t i = (a); i < (b); i++) #define REP(i,n) rep(i,0,n) #define ALL(a) begin(a),end(a) #define ...
### Prompt In cpp, your task is to solve the following problem: Almost Identical Programs The programming contest named Concours de Programmation Comtemporaine Interuniversitaire (CPCI) has a judging system similar to that of ICPC; contestants have to submit correct outputs for two different inputs to be accepted as...
#include <bits/stdc++.h> using namespace std; #define FOR(i,a,b) for(int i=(a);i<(b);++i) #define rep(i,n) FOR(i,0,n) #define pb emplace_back typedef long long ll; typedef pair<int,int> pint; int main(){ string s1,s2; while(cin>>s1,s1!="."){ cin>>s2; int c1=0,c2=0; int n1=s1.size(),n...
### Prompt Your challenge is to write a CPP solution to the following problem: Almost Identical Programs The programming contest named Concours de Programmation Comtemporaine Interuniversitaire (CPCI) has a judging system similar to that of ICPC; contestants have to submit correct outputs for two different inputs to...
#include <bits/stdc++.h> using namespace std; // スペル注意 #define rep(i,n) repi(i,0,n) #define repi(i,a,b) for(int i=(int)(a);i<(int)(b);++i) vector<string> split(string s, char sp){ vector<string> vs; string t = ""; for(char c : s){ if(c == sp){ vs.emplace_back(t); t = ""; ...
### Prompt Your challenge is to write a cpp solution to the following problem: Almost Identical Programs The programming contest named Concours de Programmation Comtemporaine Interuniversitaire (CPCI) has a judging system similar to that of ICPC; contestants have to submit correct outputs for two different inputs to...
#include <bits/stdc++.h> using namespace std; int main() { while (true){ string s1,s2; int u=-1,t=0,v=0; cin >> s1 >> s2; if (s1==".") break; vector<string> a(0),b(0); string y1="",y2=""; for (int i=0;i<s1.size();i++){ if (s1.at(i)=='"') { a.push_back(""); u++; i++; while ...
### Prompt Please formulate a cpp solution to the following problem: Almost Identical Programs The programming contest named Concours de Programmation Comtemporaine Interuniversitaire (CPCI) has a judging system similar to that of ICPC; contestants have to submit correct outputs for two different inputs to be accept...
#include <iostream> #include <algorithm> #include <vector> #include <string> using namespace std; using lint = long long; using ldouble = long double; bool solve() { string S[2]; cin >> S[0]; if (S[0] == ".") return false; cin >> S[1]; vector<string> div[2][2]; for (int i = 0; i < 2; ++i) { ...
### Prompt Please provide a Cpp coded solution to the problem described below: Almost Identical Programs The programming contest named Concours de Programmation Comtemporaine Interuniversitaire (CPCI) has a judging system similar to that of ICPC; contestants have to submit correct outputs for two different inputs to...
#include <bits/stdc++.h> using namespace std; #define int long long #define fi first #define se second #define pb push_back #define rep(i, s, n) for (int i = s; i < n; i++) #define rrep(i, s, n) for (int i = (n)-1; i >= (s); i--) #define all(a) a.begin(),a.end() const long long MOD = 1e9+7, INF = 1e18; template<class T...
### Prompt Please provide a cpp coded solution to the problem described below: Almost Identical Programs The programming contest named Concours de Programmation Comtemporaine Interuniversitaire (CPCI) has a judging system similar to that of ICPC; contestants have to submit correct outputs for two different inputs to...
#include "bits/stdc++.h" using namespace std; //#define int long long #define rep(i,a,b) for(int i=(a);i<(b);i++) signed main() { for (string a; cin >> a && a != ".";) { string b; cin >> b; vector<string> p, q; string t = ""; for (char c : a) { if (c != '"') t += c; else { p.push_back(t); t....
### Prompt Please create a solution in cpp to the following problem: Almost Identical Programs The programming contest named Concours de Programmation Comtemporaine Interuniversitaire (CPCI) has a judging system similar to that of ICPC; contestants have to submit correct outputs for two different inputs to be accept...
#include <bits/stdc++.h> using namespace std; int main(){ cin.tie(0); ios::sync_with_stdio(false); string S,T; while(cin >> S,S!="."){ cin >> T; string U="",V=""; vector<string> s,t; int ok=0; for (int i=0;i<S.size();++i){ if (S[i]=='\"'){ ...
### Prompt Create a solution in CPP for the following problem: Almost Identical Programs The programming contest named Concours de Programmation Comtemporaine Interuniversitaire (CPCI) has a judging system similar to that of ICPC; contestants have to submit correct outputs for two different inputs to be accepted as ...
#include<iostream> #include<algorithm> #include<string> #include<map> #include<iomanip> #include<vector> #define rep(i,a,b) for(int i=a;i<b;i++) using namespace std; using ll = long long; const int M = 100010; int main() { string s1,s2; int c=0; while(1){ cin>>s1; if(s1==".")break; cin>>s2; bool flag=false...
### Prompt Please create a solution in cpp to the following problem: Almost Identical Programs The programming contest named Concours de Programmation Comtemporaine Interuniversitaire (CPCI) has a judging system similar to that of ICPC; contestants have to submit correct outputs for two different inputs to be accept...
#include <bits/stdc++.h> using namespace std; string s,ss; vector<int>pos,poss; int main() { ios_base::sync_with_stdio(false); cin.tie(NULL); cout.tie(NULL); int diff; while (cin>>s) { if (s[0]=='.') break; cin>>ss; int Ls=s.size(),Lss=ss.size(); diff=0; ...
### Prompt Your task is to create a CPP solution to the following problem: Almost Identical Programs The programming contest named Concours de Programmation Comtemporaine Interuniversitaire (CPCI) has a judging system similar to that of ICPC; contestants have to submit correct outputs for two different inputs to be ...
#include <bits/stdc++.h> using namespace std; const int maxn=1e5+10; char s1[maxn],s2[maxn]; string temp1,temp2; int l,r,tim; int flag=0; void com(){ temp1="";temp2=""; l++;r++; while(s1[l]!='"'){ temp1+=s1[l]; l++; } l++; while(s2[r]!='"'){ temp2+=s2[r]; r++; } r++; if(temp1!=temp2){ tim++; } retu...
### Prompt Please formulate a Cpp solution to the following problem: Almost Identical Programs The programming contest named Concours de Programmation Comtemporaine Interuniversitaire (CPCI) has a judging system similar to that of ICPC; contestants have to submit correct outputs for two different inputs to be accept...
#include <iostream> #include <string> #include <sstream> #include <vector> void split(std::vector<std::string>& tmp, std::string& str,char delimiter); int main(){ int cnt = 0; bool odd; std::string str1; std::string str2; std::string tmp1; std::string tmp2; while(true){ cnt = 0; ...
### Prompt Please formulate a Cpp solution to the following problem: Almost Identical Programs The programming contest named Concours de Programmation Comtemporaine Interuniversitaire (CPCI) has a judging system similar to that of ICPC; contestants have to submit correct outputs for two different inputs to be accept...
#include<iostream> #include<vector> #include<string> using namespace std; int main(){ string str1,str2; while(cin >> str1, str1!="."){ cin >> str2; bool frg = true; int er_cnt = 0; int j=0; int v1_cnt = 0; int v2_cnt = 0; for(int i=0; i<str1.size(); ++i){ vector<char> v1; v...
### Prompt Please create a solution in CPP to the following problem: Almost Identical Programs The programming contest named Concours de Programmation Comtemporaine Interuniversitaire (CPCI) has a judging system similar to that of ICPC; contestants have to submit correct outputs for two different inputs to be accept...
#include <bits/stdc++.h> using namespace std; typedef long long ll; typedef pair<ll, ll> l_l; typedef pair<int, int> i_i; #define EPS (1e-7) #define INF (1e9) #define PI (acos(-1)) //const ll mod = 1000000007; int main() { //cout.precision(10); cin.tie(0); ios::sync_with_stdio(false); while(true) { ...
### Prompt Develop a solution in Cpp to the problem described below: Almost Identical Programs The programming contest named Concours de Programmation Comtemporaine Interuniversitaire (CPCI) has a judging system similar to that of ICPC; contestants have to submit correct outputs for two different inputs to be accept...
#include <iostream> #include <cstdio> #include <algorithm> using namespace std; string qoo1[220],qoo2[220]; string nom1[220],nom2[220]; void pro(string qoo[],string nom[],string s,int &j,int &k){ int len = s.length(); bool ok = false,fg = false; for(int i=0; i<len; i++){ if(ok==false&&s[i]!='\"'&&f...
### Prompt Generate a CPP solution to the following problem: Almost Identical Programs The programming contest named Concours de Programmation Comtemporaine Interuniversitaire (CPCI) has a judging system similar to that of ICPC; contestants have to submit correct outputs for two different inputs to be accepted as a ...
#include <iostream> #include <string> using namespace std; int main() { string s1, s2; while (1) { cin >> s1; if (s1[0] == '.') break; cin >> s2; int count = 0; if (s1 == s2) { cout << "IDENTICAL" << endl; continue; } int n1 = 0; ...
### Prompt Develop a solution in CPP to the problem described below: Almost Identical Programs The programming contest named Concours de Programmation Comtemporaine Interuniversitaire (CPCI) has a judging system similar to that of ICPC; contestants have to submit correct outputs for two different inputs to be accept...
#include "iostream" #include "climits" #include "list" #include "queue" #include "stack" #include "set" #include "functional" #include "algorithm" #include "math.h" #include "utility" #include "string" #include "map" #include "unordered_map" #include "iomanip" #include "random" using namespace std; const long long int...
### Prompt Please create a solution in Cpp to the following problem: Almost Identical Programs The programming contest named Concours de Programmation Comtemporaine Interuniversitaire (CPCI) has a judging system similar to that of ICPC; contestants have to submit correct outputs for two different inputs to be accept...
//argorithm 1617 #include<iostream> #include<string> using namespace std; int main(){ while(true){ string s1; cin>>s1; if(s1==".")break; string s2; cin>>s2; if(s1==s2){ cout<<"IDENTICAL"<<endl; continue; } string t1=s1; string t2=s2; while(true){ size_t ...
### Prompt In CPP, your task is to solve the following problem: Almost Identical Programs The programming contest named Concours de Programmation Comtemporaine Interuniversitaire (CPCI) has a judging system similar to that of ICPC; contestants have to submit correct outputs for two different inputs to be accepted as...
#include <bits/stdc++.h> #define chmin(a, b) ((a)=min((a), (b))) #define chmax(a, b) ((a)=max((a), (b))) #define fs first #define sc second #define eb emplace_back using namespace std; typedef long long ll; typedef pair<int, int> P; typedef tuple<int, int, int> T; const ll MOD=1e9+7; const ll INF=1e18; int dx[]={...
### Prompt Your challenge is to write a Cpp solution to the following problem: Almost Identical Programs The programming contest named Concours de Programmation Comtemporaine Interuniversitaire (CPCI) has a judging system similar to that of ICPC; contestants have to submit correct outputs for two different inputs to...
#include <iostream> #include <string> #include <vector> using namespace std; int main() { while(1) { string s1, s2; cin >> s1; if(s1 == ".") return 0; cin >>s2; string s1_cp = s1, s2_cp = s2; vector<int> cnt1(s1.size()),cnt2(s1.size()); int j = 0; for(int i = 0; i < s1.size(); i+...
### Prompt Construct a Cpp code solution to the problem outlined: Almost Identical Programs The programming contest named Concours de Programmation Comtemporaine Interuniversitaire (CPCI) has a judging system similar to that of ICPC; contestants have to submit correct outputs for two different inputs to be accepted ...
#include<iostream> #include<vector> #include<algorithm> #include<iomanip> #include<stack> #include<queue> #include<string> #include<set> #include<map> using namespace std; #define rep(i,n) for(int i=0;(i)<(n);(i)++) #define FOR(i,m,n) for(int i=(m);(i)<(n);(i)++) typedef long long ll; int main(){ string s1,s2; ...
### Prompt Please formulate a Cpp solution to the following problem: Almost Identical Programs The programming contest named Concours de Programmation Comtemporaine Interuniversitaire (CPCI) has a judging system similar to that of ICPC; contestants have to submit correct outputs for two different inputs to be accept...
#include <bits/stdc++.h> #define rep(i, a, n) for(int i = a; i < n; i++) #define REP(i, n) rep(i, 0, n) #define repb(i, a, b) for(int i = a; i >= b; i--) #define all(a) a.begin(), a.end() #define int long long #define chmax(x, y) x = max(x, y) #define chmin(x, y) x = min(x, y) using namespace std; typedef pair<int, int...
### Prompt Please formulate a cpp solution to the following problem: Almost Identical Programs The programming contest named Concours de Programmation Comtemporaine Interuniversitaire (CPCI) has a judging system similar to that of ICPC; contestants have to submit correct outputs for two different inputs to be accept...
#include <bits/stdc++.h> #define rep(i,n) for(int i=0;i<(int)(n);i++) #define ITR(x,c) for(__typeof(c.begin()) x=c.begin();x!=c.end();x++) #define RITR(x,c) for(__typeof(c.rbegin()) x=c.rbegin();x!=c.rend();x++) #define setp(n) fixed << setprecision(n) #define lf double #define ll long long #define vll vector<ll> #de...
### Prompt Create a solution in cpp for the following problem: Almost Identical Programs The programming contest named Concours de Programmation Comtemporaine Interuniversitaire (CPCI) has a judging system similar to that of ICPC; contestants have to submit correct outputs for two different inputs to be accepted as ...
// 2017/12/11 Tazoe #include <iostream> #include <string> using namespace std; int main() { while(true){ string s1; cin >> s1; if(s1==".") break; string s2; cin >> s2; if(s1==s2){ // ?????¨?????????????????° cout << "IDENTICAL" << endl; continue; } string t1 = s1; string t2 = s2; ...
### Prompt Develop a solution in CPP to the problem described below: Almost Identical Programs The programming contest named Concours de Programmation Comtemporaine Interuniversitaire (CPCI) has a judging system similar to that of ICPC; contestants have to submit correct outputs for two different inputs to be accept...
#include <iostream> #include <vector> #include <math.h> using namespace std; typedef long long ll; int main(void){ while (1) { string s, t; cin >> s; if (s == ".") return 0; cin >> t; if (s == t) cout << "IDENTICAL" << endl; else { int s_idx = 0,...
### Prompt Develop a solution in cpp to the problem described below: Almost Identical Programs The programming contest named Concours de Programmation Comtemporaine Interuniversitaire (CPCI) has a judging system similar to that of ICPC; contestants have to submit correct outputs for two different inputs to be accept...
#include<bits/stdc++.h> using namespace std; #define ll long long typedef pair<ll,ll> P; typedef pair<ll,P> PP; const ll MOD = 1e9+7; int main(){ string s,t; while(cin>>s,s!="."){ cin>>t; //cout<<"A"<<endl; vector<string> vs[2],vt[2]; int cnt=0; string tmp=""; for(int i=0;i<s.size();i++){ if(s[i]=='"'){ ...
### Prompt Your task is to create a Cpp solution to the following problem: Almost Identical Programs The programming contest named Concours de Programmation Comtemporaine Interuniversitaire (CPCI) has a judging system similar to that of ICPC; contestants have to submit correct outputs for two different inputs to be ...
#include <iostream> #include <string> using namespace std; int n,m,l; string s1, s2; void input() { cin >> s1; if (s1 == ".")return; cin >> s2; } void output() { cout << endl; } void prep() { n = s1.length(); m = s2.length(); s1 = s1 + "$"; s2 = s2 + "$"; } void solve() { int i = 0; int j = 0; int h = 1; in...
### Prompt Construct a CPP code solution to the problem outlined: Almost Identical Programs The programming contest named Concours de Programmation Comtemporaine Interuniversitaire (CPCI) has a judging system similar to that of ICPC; contestants have to submit correct outputs for two different inputs to be accepted ...
#define _CRT_SECURE_NO_WARNINGS #include <iostream> #include <string> #include <vector> #include <cmath> #include <fstream> #include <set> #include <utility> #include <algorithm> #include <queue> #include <stack> #include <deque> #include <numeric> #include <sstream> #include <list> #include <map> #define rep(i,p,n) ...
### Prompt Please create a solution in Cpp to the following problem: Almost Identical Programs The programming contest named Concours de Programmation Comtemporaine Interuniversitaire (CPCI) has a judging system similar to that of ICPC; contestants have to submit correct outputs for two different inputs to be accept...
#include <bits/stdc++.h> using namespace std; int main(){ while(true){ string s,t; cin>>s; if(s==".")break; cin>>t; int si=0,ti=0; bool dq=false; int stat=0;//0:IDENTICAL 1:CLOSE 2:DIFFERENT while(si<s.size()&&ti<t.size()){ if(dq){ ...
### Prompt In cpp, your task is to solve the following problem: Almost Identical Programs The programming contest named Concours de Programmation Comtemporaine Interuniversitaire (CPCI) has a judging system similar to that of ICPC; contestants have to submit correct outputs for two different inputs to be accepted as...
#include<iostream> #include<algorithm> #include<numeric> #include<vector> #include<set> #include <math.h> #include <string> #define cinf(n,x,y) for(int i=0;i<(n);i++) cin >> x[i]>>y[i]; typedef long long int ll; const ll INF =1LL << 62; using namespace std; int MAX_E=1000010; ll dp[1000010]; void split(string s, vector...
### Prompt Your challenge is to write a CPP solution to the following problem: Almost Identical Programs The programming contest named Concours de Programmation Comtemporaine Interuniversitaire (CPCI) has a judging system similar to that of ICPC; contestants have to submit correct outputs for two different inputs to...
#include <bits/stdc++.h> using namespace std; string s1, s2; string solve() { s1 += '.'; s2 += '.'; int i = 0, j = 0; int qt1 = 0, qt2 = 0; int change = 0; while (i < s1.length() || j < s2.length()) { if (s1[i] == '"') qt1 = 1; if (s2[j] == '"') qt2 = 1; string t1 = ""...
### Prompt Please create a solution in cpp to the following problem: Almost Identical Programs The programming contest named Concours de Programmation Comtemporaine Interuniversitaire (CPCI) has a judging system similar to that of ICPC; contestants have to submit correct outputs for two different inputs to be accept...
#include<bits/stdc++.h> #define LL long long #define MOD 1e9+7 #define pi acos(-1.0) #define ULL unsigned long long #define mem_1(str) memset(str,-1,sizeof(str)) #define mem0(str) memset(str,0,sizeof(str)) #define rep(i,a,n) for (int i=a;i<n;i++) #define per(i,a,n) for (int i=n-1;i>=a;i--) using namespace std; const i...
### Prompt Develop a solution in CPP to the problem described below: Almost Identical Programs The programming contest named Concours de Programmation Comtemporaine Interuniversitaire (CPCI) has a judging system similar to that of ICPC; contestants have to submit correct outputs for two different inputs to be accept...
#include <iostream> #include <algorithm> #include <vector> #include <queue> #include <stack> #include <string> #include <math.h> #include <stdlib.h> #include <string.h> using namespace std; // using ll = long long; // using P = pair<int, int>; // using minpq = priority_queue<int, vector<int>, greater<int> >; int mai...
### Prompt Your task is to create a CPP solution to the following problem: Almost Identical Programs The programming contest named Concours de Programmation Comtemporaine Interuniversitaire (CPCI) has a judging system similar to that of ICPC; contestants have to submit correct outputs for two different inputs to be ...
#include <bits/stdc++.h> #define rep(i,n) for(int i=0;i<(int)(n);i++) #define len(v) (int)(v).size() using namespace std; int main() { while(1){ string s,t; cin >> s; if(s == ".") break; cin >> t; if(s == t){ cout << "IDENTICAL\n"; continue; ...
### Prompt Construct a Cpp code solution to the problem outlined: Almost Identical Programs The programming contest named Concours de Programmation Comtemporaine Interuniversitaire (CPCI) has a judging system similar to that of ICPC; contestants have to submit correct outputs for two different inputs to be accepted ...
#include <bits/stdc++.h> using namespace std; #define rep(i, n) for(int i = 0; i < (n); i++) #define repp(i, l, r) for(int i = (l); i < (r); i++) #define per(i, n) for(int i = ((n)-1); i >= 0; i--) #define perr(i, l, r) for(int i = ((r)-1); i >= (l); i--) #define all(x) (x).begin(),(x).end() #define MOD 1000000007 #de...
### Prompt Your challenge is to write a Cpp solution to the following problem: Almost Identical Programs The programming contest named Concours de Programmation Comtemporaine Interuniversitaire (CPCI) has a judging system similar to that of ICPC; contestants have to submit correct outputs for two different inputs to...
#include <bits/stdc++.h> using namespace std; #define FOR(i,a,b) for(int i = (a);i<(b);++i) #define REP(i,n) FOR(i,0,n) #define ALL(v) (v).begin(),(v).end() #define fi first #define se second template<typename A, typename B> inline bool chmax(A &a, B b) { if (a<b) { a=b; return 1; } return 0; } template<typename A, typ...
### Prompt In CPP, your task is to solve the following problem: Almost Identical Programs The programming contest named Concours de Programmation Comtemporaine Interuniversitaire (CPCI) has a judging system similar to that of ICPC; contestants have to submit correct outputs for two different inputs to be accepted as...
#include "bits/stdc++.h" #define REP(i, n, N) for(ll i=(n); i<(N); i++) #define RREP(i, n, N) for(ll i=(N-1); i>=n; i--) #define SPACEREP(lst,itr) for(auto itr=lst.begin(); itr!=lst.end();++itr){cout<<*itr<<(++itr!=anslist.end()?" ":"\n");itr--;} #define CK(n, a, b) ((a)<=(n)&&(n)<(b)) #define ALL(v) (v).begin(),(v).e...
### Prompt Please create a solution in CPP to the following problem: Almost Identical Programs The programming contest named Concours de Programmation Comtemporaine Interuniversitaire (CPCI) has a judging system similar to that of ICPC; contestants have to submit correct outputs for two different inputs to be accept...
#include <iostream> #include <string> using namespace std; int main() { while(true){ string s1; cin >> s1; if(s1==".") break; string s2; cin >> s2; if(s1==s2){ cout << "IDENTICAL" << endl; continue; } string t1 = s1; string t2 = s2; while(true){ size_t d1b = t1.find('\"'); if(d...
### Prompt Generate a cpp solution to the following problem: Almost Identical Programs The programming contest named Concours de Programmation Comtemporaine Interuniversitaire (CPCI) has a judging system similar to that of ICPC; contestants have to submit correct outputs for two different inputs to be accepted as a ...