Search is not available for this dataset
name
stringlengths
2
112
description
stringlengths
29
13k
source
int64
1
7
difficulty
int64
0
25
solution
stringlengths
7
983k
language
stringclasses
4 values
p01102 Almost Identical Programs
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 correct solution. Each of the submissions should include the pr...
7
0
#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; ...
CPP
p01102 Almost Identical Programs
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 correct solution. Each of the submissions should include the pr...
7
0
while True: s1 = input() if s1==".": break s2 = input() s1words = [] s2words = [] s1split = "" s2split = "" flag = False string = "" for e in s1: if not flag and e=='"': flag = True s1split += e elif flag and e=='"': flag = False s1split += e s1words.appen...
PYTHON3
p01102 Almost Identical Programs
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 correct solution. Each of the submissions should include the pr...
7
0
import java.util.*; public class Main { public static void main(String[] args) { Scanner in=new Scanner(System.in); while(true) { String str1=in.next(); if(str1.equals("."))break; String[] ss1=str1.split("\"",-1); String str2=in.next(); String[] ss2=str2.split("\"", -1); if(ss1.length==ss2....
JAVA
p01102 Almost Identical Programs
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 correct solution. Each of the submissions should include the pr...
7
0
#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...
CPP
p01102 Almost Identical Programs
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 correct solution. Each of the submissions should include the pr...
7
0
#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; } ...
CPP
p01102 Almost Identical Programs
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 correct solution. Each of the submissions should include the pr...
7
0
#16D8101014F 久留米 竜之介 Python3 #a=[] while(True): i=0 tmp=0 a=input().split('"') aL=len(a) if a[0] ==".": break b=input().split('"') bL=len(b) if aL != bL: print("DIFFERENT") else: while(True): if a[i] != b[i]: print("DIFFERENT") break elif i > aL-2: if tmp==1: print("CLOSE") ...
PYTHON3
p01102 Almost Identical Programs
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 correct solution. Each of the submissions should include the pr...
7
0
#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...
CPP
p01102 Almost Identical Programs
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 correct solution. Each of the submissions should include the pr...
7
0
#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; ...
CPP
p01102 Almost Identical Programs
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 correct solution. Each of the submissions should include the pr...
7
0
#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...
CPP
p01102 Almost Identical Programs
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 correct solution. Each of the submissions should include the pr...
7
0
import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; class Main{ public static void main(String[] args) throws IOException { BufferedReader bfr=new BufferedReader(new InputStreamReader(System.in)); String s1="",s2=""; while(true) { s1=bfr.readLine()+"END"; if(s1.equ...
JAVA
p01102 Almost Identical Programs
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 correct solution. Each of the submissions should include the pr...
7
0
#coading Shit_JIS def judge(ch1,ch2): if ch1!=ch2: return 1 return 0 while 1: str1=input().split('"') if str1[0]=='.': break str2=input().split('"') l1=len(str1) l2=len(str2) flag=[0]*2 if l1-l2!=0: flag[0]=1 else: for j in range(l1): if len(str1[j])!=len(str2[j]): flag[j%2]+=1 else: for i i...
PYTHON3
p01102 Almost Identical Programs
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 correct solution. Each of the submissions should include the pr...
7
0
#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...
CPP
p01102 Almost Identical Programs
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 correct solution. Each of the submissions should include the pr...
7
0
#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)...
CPP
p01102 Almost Identical Programs
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 correct solution. Each of the submissions should include the pr...
7
0
#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...
CPP
p01102 Almost Identical Programs
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 correct solution. Each of the submissions should include the pr...
7
0
#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...
CPP
p01102 Almost Identical Programs
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 correct solution. Each of the submissions should include the pr...
7
0
#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(...
CPP
p01102 Almost Identical Programs
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 correct solution. Each of the submissions should include the pr...
7
0
#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 ...
CPP
p01102 Almost Identical Programs
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 correct solution. Each of the submissions should include the pr...
7
0
while True: s1 = input() if s1 == ".": break s2 = input().split("\"") s1 = s1.split("\"") if len(s1) != len(s2): print("DIFFERENT") else: fin = False count = 0 for i in range(len(s1)): if i%2 == 0: if s1[i] != s2[i]: ...
PYTHON3
p01102 Almost Identical Programs
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 correct solution. Each of the submissions should include the pr...
7
0
#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] == '\"') { ...
CPP
p01102 Almost Identical Programs
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 correct solution. Each of the submissions should include the pr...
7
0
#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 ...
CPP
p01102 Almost Identical Programs
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 correct solution. Each of the submissions should include the pr...
7
0
import java.util.ArrayList; import java.util.Scanner; public class Main { public static void main(String[] args) { ArrayList<String> result = new ArrayList<String>(); Scanner insert = new Scanner(System.in); outside:while(true) { String line = insert.nextLine(); if(line.equals(".")) { break outside;...
JAVA
p01102 Almost Identical Programs
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 correct solution. Each of the submissions should include the pr...
7
0
#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>...
CPP
p01102 Almost Identical Programs
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 correct solution. Each of the submissions should include the pr...
7
0
#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] == '"'){...
CPP
p01102 Almost Identical Programs
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 correct solution. Each of the submissions should include the pr...
7
0
#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(...
CPP
p01102 Almost Identical Programs
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 correct solution. Each of the submissions should include the pr...
7
0
#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...
CPP
p01102 Almost Identical Programs
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 correct solution. Each of the submissions should include the pr...
7
0
#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(); ...
CPP
p01102 Almost Identical Programs
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 correct solution. Each of the submissions should include the pr...
7
0
#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...
CPP
p01102 Almost Identical Programs
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 correct solution. Each of the submissions should include the pr...
7
0
#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)...
CPP
p01102 Almost Identical Programs
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 correct solution. Each of the submissions should include the pr...
7
0
#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...
CPP
p01102 Almost Identical Programs
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 correct solution. Each of the submissions should include the pr...
7
0
#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...
CPP
p01102 Almost Identical Programs
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 correct solution. Each of the submissions should include the pr...
7
0
#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...
CPP
p01102 Almost Identical Programs
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 correct solution. Each of the submissions should include the pr...
7
0
#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 #...
CPP
p01102 Almost Identical Programs
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 correct solution. Each of the submissions should include the pr...
7
0
#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 ...
CPP
p01102 Almost Identical Programs
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 correct solution. Each of the submissions should include the pr...
7
0
#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...
CPP
p01102 Almost Identical Programs
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 correct solution. Each of the submissions should include the pr...
7
0
#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 = ""; ...
CPP
p01102 Almost Identical Programs
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 correct solution. Each of the submissions should include the pr...
7
0
from collections import defaultdict,deque import sys,heapq,bisect,math,itertools,string,queue sys.setrecursionlimit(10**8) INF = float('inf') mod = 10**9+7 eps = 10**-7 def inpl(): return list(map(int, input().split())) def inpl_str(): return list(input().split()) while True: s1 = input() if s1 == '.': ...
PYTHON3
p01102 Almost Identical Programs
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 correct solution. Each of the submissions should include the pr...
7
0
import sys read = sys.stdin.read readline = sys.stdin.readline readlines = sys.stdin.readlines while True: s1 = input() if s1 == '.': break s2 = input() a = s1.strip().split('\"') b = s2.strip().split('\"') if len(a) != len(b): print("DIFFERENT") elif a[0::2] != b[0::2]: ...
PYTHON3
p01102 Almost Identical Programs
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 correct solution. Each of the submissions should include the pr...
7
0
#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 ...
CPP
p01102 Almost Identical Programs
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 correct solution. Each of the submissions should include the pr...
7
0
while(1): a = input() if(a == '.'): break b = input() n = len(a) m = len(b) l = 0; flag = 0 idx_dif = 0 error_cou = 0 while(1): if(l >= n-1 or l+idx_dif >= m-1): flag = 2 if(flag == 0): for i in range(l,n): if(a[i]...
PYTHON3
p01102 Almost Identical Programs
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 correct solution. Each of the submissions should include the pr...
7
0
#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) { ...
CPP
p01102 Almost Identical Programs
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 correct solution. Each of the submissions should include the pr...
7
0
import sys import re def input(): return sys.stdin.readline().strip() def INT(): return int(input()) def LIST(): return list(map(int, input().split())) ans = [] while 1: s1 = input() if s1 == ".": break s2 = input() if s1 == s2: ans.append("IDENTICAL") else: if s1.count('"') != s2.count('"'): ans.append...
PYTHON3
p01102 Almost Identical Programs
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 correct solution. Each of the submissions should include the pr...
7
0
# AOJ 1617: Almost Identical Programs # Python3 2018.7.13 bal4u s = {0:"IDENTICAL", 1:"CLOSE", 2:"DIFFERENT"} while True: s1 = input(); if s1 == '.': break s1 = list(s1) s2 = list(input()) w1, w2 = len(s1), len(s2) i = j = 0 ans, k = -1, 0 while i < w1 and j < w2: if s1[i] != s2[j]: ans = 2; break if s1[i]...
PYTHON3
p01102 Almost Identical Programs
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 correct solution. Each of the submissions should include the pr...
7
0
#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...
CPP
p01102 Almost Identical Programs
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 correct solution. Each of the submissions should include the pr...
7
0
def solve(s1, s2): if len(s1) != len(s2): return "DIFFERENT" for i in range(0, len(s1), 2): if s1[i] != s2[i]: return "DIFFERENT" diff_count = 0 for i in range(1, len(s1), 2): if s1[i] != s2[i]: diff_count += 1 if diff_count == 0: return "IDENT...
PYTHON3
p01102 Almost Identical Programs
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 correct solution. Each of the submissions should include the pr...
7
0
#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....
CPP
p01102 Almost Identical Programs
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 correct solution. Each of the submissions should include the pr...
7
0
import java.io.PrintWriter; import java.util.*; public class Main { private static Scanner in = new Scanner(System.in); private static PrintWriter out = new PrintWriter(System.out); public static void main(String[] args) { solve(); out.flush(); } private static void solve() { ...
JAVA
p01102 Almost Identical Programs
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 correct solution. Each of the submissions should include the pr...
7
0
while True: try: s1 = input() s2 = input() except: break c = 0 while True: try: i = s1.index("\"") if s1[:i] != s2[:i]: print("DIFFERENT") break except: if s1 == s2: if c == 0: ...
PYTHON3
p01102 Almost Identical Programs
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 correct solution. Each of the submissions should include the pr...
7
0
#!/usr/bin/env python3 # -*- coding: utf-8 -*- import re def rdp_connect() -> bool: global s1, s2 s1 = input() if s1 == '.': return False s2 = input() return True def rdp_token(s: str): res = [] while s: match = re.match(r'[a-zA-Z0-9;]+', s) if match: re...
PYTHON3
p01102 Almost Identical Programs
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 correct solution. Each of the submissions should include the pr...
7
0
#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]=='\"'){ ...
CPP
p01102 Almost Identical Programs
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 correct solution. Each of the submissions should include the pr...
7
0
#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...
CPP
p01102 Almost Identical Programs
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 correct solution. Each of the submissions should include the pr...
7
0
#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; ...
CPP
p01102 Almost Identical Programs
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 correct solution. Each of the submissions should include the pr...
7
0
#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...
CPP
p01102 Almost Identical Programs
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 correct solution. Each of the submissions should include the pr...
7
0
#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; ...
CPP
p01102 Almost Identical Programs
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 correct solution. Each of the submissions should include the pr...
7
0
#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...
CPP
p01102 Almost Identical Programs
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 correct solution. Each of the submissions should include the pr...
7
0
#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) { ...
CPP
p01102 Almost Identical Programs
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 correct solution. Each of the submissions should include the pr...
7
0
while(1): a = input() if(a == '.'): break b = input() n = len(a) m = len(b) l = 0 flag = 0 idx_dif = 0 error_cou = 0 while(1): if(flag == 0): for i in range(l,n): if(a[i] == '\"'): if(i+idx_dif < m and a[l:i+1] == b...
PYTHON3
p01102 Almost Identical Programs
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 correct solution. Each of the submissions should include the pr...
7
0
#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...
CPP
p01102 Almost Identical Programs
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 correct solution. Each of the submissions should include the pr...
7
0
#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; ...
CPP
p01102 Almost Identical Programs
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 correct solution. Each of the submissions should include the pr...
7
0
#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...
CPP
p01102 Almost Identical Programs
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 correct solution. Each of the submissions should include the pr...
7
0
//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 ...
CPP
p01102 Almost Identical Programs
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 correct solution. Each of the submissions should include the pr...
7
0
#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[]={...
CPP
p01102 Almost Identical Programs
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 correct solution. Each of the submissions should include the pr...
7
0
#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+...
CPP
p01102 Almost Identical Programs
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 correct solution. Each of the submissions should include the pr...
7
0
#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; ...
CPP
p01102 Almost Identical Programs
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 correct solution. Each of the submissions should include the pr...
7
0
#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...
CPP
p01102 Almost Identical Programs
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 correct solution. Each of the submissions should include the pr...
7
0
#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...
CPP
p01102 Almost Identical Programs
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 correct solution. Each of the submissions should include the pr...
7
0
import java.util.Scanner; public class Main { // AOJ2017 2問目 public static void main(String[] args) { Scanner s = new Scanner(System.in); String a, b; Star: while (true) { int count = 0, lena = 0, lenb = 0; a = s.next(); if (a.equals(".")) { break; } b = s.next(); // a=b if (a.equals...
JAVA
p01102 Almost Identical Programs
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 correct solution. Each of the submissions should include the pr...
7
0
import java.util.*; public class Main { public static void main(String[] args) throws Exception { Scanner sc = new Scanner(System.in); while(true){ String s1 = sc.nextLine(); if(s1.equals(".")) break; String s2 = sc.nextLine(); boolean flag = tru...
JAVA
p01102 Almost Identical Programs
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 correct solution. Each of the submissions should include the pr...
7
0
// 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; ...
CPP
p01102 Almost Identical Programs
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 correct solution. Each of the submissions should include the pr...
7
0
#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,...
CPP
p01102 Almost Identical Programs
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 correct solution. Each of the submissions should include the pr...
7
0
#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]=='"'){ ...
CPP
p01102 Almost Identical Programs
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 correct solution. Each of the submissions should include the pr...
7
0
while True: s1 = raw_input() if s1 == '.': break s2 = raw_input() s1 = s1.split('"') s2 = s2.split('"') if s1 == s2: print "IDENTICAL" elif len(s1) != len(s2): print "DIFFERENT" else: cnt = 0 for i in range(len(s1)): if s1[i] !...
PYTHON
p01102 Almost Identical Programs
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 correct solution. Each of the submissions should include the pr...
7
0
#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...
CPP
p01102 Almost Identical Programs
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 correct solution. Each of the submissions should include the pr...
7
0
""" 与えられた二つのプログラムが完全に等しければ IDENTICAL と出力せよ. 二つのプログラム中の対応する文字列定数一つだけが異なるならば CLOSE と出力せよ. それ以外の場合,DIFFERENT と出力せよ. """ import re while True: s1 = str(input()) if s1 == '.': break s2 = str(input()) moziretsuteisu_s1 = re.findall("\".*?\"", s1) moziretsuteisu_s2 = re.findall("\".*?\"", s2) ...
PYTHON3
p01102 Almost Identical Programs
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 correct solution. Each of the submissions should include the pr...
7
0
#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) ...
CPP
p01102 Almost Identical Programs
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 correct solution. Each of the submissions should include the pr...
7
0
#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){ ...
CPP
p01102 Almost Identical Programs
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 correct solution. Each of the submissions should include the pr...
7
0
def check(s1,s2): l1 = s1.split('"') l2 = s2.split('"') if len(l1) != len(l2): return "DIFFERENT" close = 0 for i in range(len(l1)): if l1[i] != l2[i]: if i % 2 == 0: return "DIFFERENT" else : close += 1 if close == 1: return "CLOSE" if close == 0: ret...
PYTHON3
p01102 Almost Identical Programs
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 correct solution. Each of the submissions should include the pr...
7
0
#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...
CPP
p01102 Almost Identical Programs
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 correct solution. Each of the submissions should include the pr...
7
0
#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 = ""...
CPP
p01102 Almost Identical Programs
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 correct solution. Each of the submissions should include the pr...
7
0
#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...
CPP
p01102 Almost Identical Programs
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 correct solution. Each of the submissions should include the pr...
7
0
while True: s1 = input() if s1 == ".": break s2 = input() listed_s1 = [[]] listed_s2 = [[]] start = 0 now = 0 for i in range(len(s1)): if s1[i] == "\"" and not start: listed_s1.append([]) now += 1 start = 1 listed_s1[now].a...
PYTHON3
p01102 Almost Identical Programs
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 correct solution. Each of the submissions should include the pr...
7
0
while True: A = list(input().split("\"")) if A[0] == ".": break B = list(input().split("\"")) wrong = 0 ans = "" for i in range(min(len(A),len(B))): if i%2 == 1: if A[i] != B[i]: wrong += 1 else: if A[i] != B[i]: ...
PYTHON3
p01102 Almost Identical Programs
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 correct solution. Each of the submissions should include the pr...
7
0
#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...
CPP
p01102 Almost Identical Programs
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 correct solution. Each of the submissions should include the pr...
7
0
#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; ...
CPP
p01102 Almost Identical Programs
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 correct solution. Each of the submissions should include the pr...
7
0
#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...
CPP
p01102 Almost Identical Programs
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 correct solution. Each of the submissions should include the pr...
7
0
while 1: s1 = input().split('\"') if s1[0] == '.': break s2 = input().split('\"') jdg = 1 cnt_d = 0 if len(s1) != len(s2): print("DIFFERENT") else: l = len(s1) i = 0 while i < l: if s1[i] != s2[i]: cnt_d += 1 if cnt_d == 1...
PYTHON3
p01102 Almost Identical Programs
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 correct solution. Each of the submissions should include the pr...
7
0
# coding: utf-8 """ """ while True: s1 = raw_input() if s1 == '.': break s2 = raw_input() if s1 == s2: print "IDENTICAL" elif s1.count('"') != s2.count('"'): print "DIFFERENT" else: s1 = s1.split('"') s2 = s2.split('"') cnt = 0 ...
PYTHON
p01102 Almost Identical Programs
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 correct solution. Each of the submissions should include the pr...
7
0
#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...
CPP
p01102 Almost Identical Programs
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 correct solution. Each of the submissions should include the pr...
7
0
import java.util.Scanner; public class Main { public static void main(String[] args) { Main m = new Main(); m.run(); } Scanner sc = new Scanner(System.in); void run() { for(;;){ String s = sc.next()+"_EOT"; if(s.equals("."+"_EOT")){ break; } String s2 = sc.next()+"_EOT"; S...
JAVA
p01102 Almost Identical Programs
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 correct solution. Each of the submissions should include the pr...
7
0
s1=[] s2=[] O=[] while 1: A=input().split('"') if A==["."]: break i=0 cnt=0 B=input().split('"') l1=len(A) l2=len(B) if l1==l2: while i<l1 and i<l2: if A[i]!=B[i]: cnt+=1 if i%2==0: cnt+=2 i+=1...
PYTHON3
p01102 Almost Identical Programs
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 correct solution. Each of the submissions should include the pr...
7
0
#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...
CPP
p01102 Almost Identical Programs
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 correct solution. Each of the submissions should include the pr...
7
0
#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...
CPP
p01102 Almost Identical Programs
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 correct solution. Each of the submissions should include the pr...
7
0
#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...
CPP
p01102 Almost Identical Programs
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 correct solution. Each of the submissions should include the pr...
7
0
#include<iostream> #include<vector> #include<string> using namespace std; int main(){ string s,t; while(cin >> s&&s!="."){ cin >> t; vector<string> v1,u1,v2,u2; bool flag = 0; string tmp; for(int i=0;i<s.size();i++){ if(s[i]=='"'&&!flag){ v1.p...
CPP
p01102 Almost Identical Programs
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 correct solution. Each of the submissions should include the pr...
7
0
import java.util.ArrayList; import java.util.Scanner; import java.util.regex.Matcher; import java.util.regex.Pattern; public class Main { public static String IDENTICAL = "IDENTICAL"; public static String CLOSE = "CLOSE"; public static String DIFFERENT = "DIFFERENT"; public static void main(String[] a...
JAVA
p01102 Almost Identical Programs
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 correct solution. Each of the submissions should include the pr...
7
0
#include<bits/stdc++.h> using namespace std; #define rep(i,n) for(int i = 0; i < (n); ++i) vector<string> f(string s){ vector<string> ret; string a = ""; for(auto c:s){ if(c == '"'){ ret.push_back(a); a = ""; }else{ a += c; } } ret.push_...
CPP
p01102 Almost Identical Programs
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 correct solution. Each of the submissions should include the pr...
7
0
#include <bits/stdc++.h> #define MOD 1000000007 typedef long long ll; using namespace std; string S,T; void solve(){ if(S==T){ cout<<"IDENTICAL"<<endl; return; } vector<string> a,b; vector<string> x,y; bool flag=false; string tmp; string rest=""; for(int i=0;i<S.size();i++){ if(S[i]=='"')...
CPP
p01102 Almost Identical Programs
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 correct solution. Each of the submissions should include the pr...
7
0
#define _USE_MATH_DEFINES #include <cstdio> #include <cstdlib> #include <iostream> #include <cmath> #include <algorithm> #include <vector> #include <queue> #include <map> using namespace std; int main(){ while(true){ string str1, str2; cin >> str1; if(str1[0] == '.' && str1.size() == 1){ break; } cin...
CPP
p01102 Almost Identical Programs
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 correct solution. Each of the submissions should include the pr...
7
0
#include<bits/stdc++.h> using namespace std; int main(){ string s; while(cin >> s, s != "."){ string t; cin >> t; vector<string> v, w; v.push_back(""); for(int i = 0 ; i < s.size() ; ++i){ if(s[i] == '"'){ v.push_back(""); }else{ ...
CPP
p01102 Almost Identical Programs
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 correct solution. Each of the submissions should include the pr...
7
0
#include<iostream> using namespace std; int main(){ char s1[200]={0}; char s2[200]={0}; char t1[200]={0}; char t2[200]={0}; char u1[200]={0}; char u2[200]={0}; int c=0,flag=0,j=0,k=0,l=0; for(int x=0;x<100;x++){ cin>>s1; if(s1[0]=='.') break; //input cin>>s2; for(int i=0;i...
CPP
p01102 Almost Identical Programs
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 correct solution. Each of the submissions should include the pr...
7
0
ans=[] while 1: s1=input().split('"') if s1==["."]: break s2=input().split('"') if len(s1)!=len(s2): ans.append("DIFFERENT") continue else: cnt=0 flag=0 for i in range(len(s1)): if s1[i]!=s2[i]: if i%2==0: ans.ap...
PYTHON3