답안 #951853

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
951853 2024-03-22T20:45:51 Z Saul0906 PIN (CEOI10_pin) C++14
15 / 100
1000 ms 89680 KB
#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], t;
	map<string,int> ss;
	rep(i,0,n){
		cin>>s[i];
		t=s[i];
		rep(k,0,4){
			rep(j,0,10) if(j+'0'!=s[i][k]) t[k]=j+'0', ans+=ss[t];
			rep(j,0,26) if(j+'a'!=s[i][k]) t[k]=j+'a', ans+=ss[t];
			t[k]=s[i][k];
		}
		ss[s[i]]++;
	}
	cout<<ans<<endl;
}
# 결과 실행 시간 메모리 Grader output
1 Correct 60 ms 13092 KB Output is correct
2 Incorrect 57 ms 12368 KB Output isn't correct
3 Incorrect 44 ms 10320 KB Output isn't correct
4 Correct 757 ms 31648 KB Output is correct
5 Correct 926 ms 32152 KB Output is correct
6 Incorrect 961 ms 31916 KB Output isn't correct
7 Incorrect 756 ms 31788 KB Output isn't correct
8 Execution timed out 1026 ms 32280 KB Time limit exceeded
9 Execution timed out 1031 ms 32620 KB Time limit exceeded
10 Execution timed out 1067 ms 32604 KB Time limit exceeded
11 Incorrect 984 ms 32080 KB Output isn't correct
12 Execution timed out 1025 ms 32636 KB Time limit exceeded
13 Execution timed out 1030 ms 32192 KB Time limit exceeded
14 Execution timed out 1004 ms 32420 KB Time limit exceeded
15 Execution timed out 1035 ms 32652 KB Time limit exceeded
16 Execution timed out 1096 ms 89680 KB Time limit exceeded
17 Execution timed out 1052 ms 88052 KB Time limit exceeded
18 Execution timed out 1061 ms 86636 KB Time limit exceeded
19 Execution timed out 1047 ms 86864 KB Time limit exceeded
20 Execution timed out 1104 ms 88912 KB Time limit exceeded