# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
951852 | Saul0906 | PIN (CEOI10_pin) | C++14 | 1101 ms | 2384 KiB |
This submission is migrated from previous version of oj.uz, which used different machine for grading. This submission may have different result if resubmitted.
#include <bits/stdc++.h>
#define rep(a,b,c) for(int a=b; a<c; a++)
#define repa(a,b) for(auto a:b)
#define fi first
#define se second
#define pii pair<int, int>
#define ll long long
#define endl "\n"
using namespace std;
int main(){
ios_base::sync_with_stdio(false);
cin.tie(0);
cout.tie(0);
int n, d, ans=0;
cin>>n>>d;
string s[n];
rep(i,0,n){
cin>>s[i];
rep(j,0,i){
int c=0;
rep(k,0,4) if(s[i][k]!=s[j][k]) c++;
if(c==d) ans++;
}
}
cout<<ans<<endl;
}
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |